- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 03:39 AM
I want to open the record in a new tab, similar to how we do it in SOW.
Same we are doing in SOW
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 03:40 AM - edited 09-24-2024 06:34 AM
I was able to fix this. In the latest Tokyo version when you create UI Builder pages with the three new UI Page Templates you will not get a record in that pages sys_ux_page_registry for chrome_tab. I'm not sure why that value isnt' added automatically in the newer page templates. You can create a page with a newer template or a Blank Page and add it manually. A good base JSON for it is
{
"contextual":[
"record"
],
"maxMainTabLimit":10,
"maxTotalSubTabLimit":30
}
You'll then need to create a Client Script and map it to your Lists Row Clicked Event. If you create a page with the old templates you can see an example of this or use the below
function handler({
api,
helpers,
event,
imports
}) {
const {
routeMapping,
buildDefaultRoutePayload
} = imports["global.recordRoutesMapping"]();
var route = 'record';
var targetRoute = '';
const defaultRoutePayload = buildDefaultRoutePayload(route, targetRoute, event);
const routeMap = api.data.dynamic_routing_simplelist.routeMap;
const payload = routeMapping(routeMap, defaultRoutePayload, event);
// If a table name passed into trueupTable matches the existing table
// refresh trueup DR to get real table name; otherwise use existing.
if(api.state.routeParentTables && api.state.routeParentTables.split(',').find(table => table === payload.fields.table)) {
api.setState('navigationPayload', payload);
api.data.resolve_route_parent_tables.refresh();
} else {
api.emit('NAV_ITEM_SELECTED', payload);
}
}- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 03:40 AM - edited 09-24-2024 06:34 AM
I was able to fix this. In the latest Tokyo version when you create UI Builder pages with the three new UI Page Templates you will not get a record in that pages sys_ux_page_registry for chrome_tab. I'm not sure why that value isnt' added automatically in the newer page templates. You can create a page with a newer template or a Blank Page and add it manually. A good base JSON for it is
{
"contextual":[
"record"
],
"maxMainTabLimit":10,
"maxTotalSubTabLimit":30
}
You'll then need to create a Client Script and map it to your Lists Row Clicked Event. If you create a page with the old templates you can see an example of this or use the below
function handler({
api,
helpers,
event,
imports
}) {
const {
routeMapping,
buildDefaultRoutePayload
} = imports["global.recordRoutesMapping"]();
var route = 'record';
var targetRoute = '';
const defaultRoutePayload = buildDefaultRoutePayload(route, targetRoute, event);
const routeMap = api.data.dynamic_routing_simplelist.routeMap;
const payload = routeMapping(routeMap, defaultRoutePayload, event);
// If a table name passed into trueupTable matches the existing table
// refresh trueup DR to get real table name; otherwise use existing.
if(api.state.routeParentTables && api.state.routeParentTables.split(',').find(table => table === payload.fields.table)) {
api.setState('navigationPayload', payload);
api.data.resolve_route_parent_tables.refresh();
} else {
api.emit('NAV_ITEM_SELECTED', payload);
}
}