- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 11:20 AM - edited 04-22-2024 11:21 AM
Hi All,
There is a drop-down in UI BUILDER, A functionality is require when i click on first table, then list of record of the table should open,
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 12:10 PM
Hi @Balbir_Singh,
you can implement following steps:
create client script and use this code:
/**
* @param {params} params
* @param {api} params.api
* @param {any} params.event
* @param {any} params.imports
*/
function handler({
api,
event,
helpers,
imports
}) {
var table;
switch(event.payload.item.id){
case "incident":
{ table = "incident";
break;}
case "change request":
{ table = "change_request";
break;}
}
api.emit('NAV_ITEM_SELECTED', {
route: "record",
fields: {
table: table,
sysId: "-1"
}
});
}
Create client state:
Add your above client script on dropdown events:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 12:10 PM
Hi @Balbir_Singh,
you can implement following steps:
create client script and use this code:
/**
* @param {params} params
* @param {api} params.api
* @param {any} params.event
* @param {any} params.imports
*/
function handler({
api,
event,
helpers,
imports
}) {
var table;
switch(event.payload.item.id){
case "incident":
{ table = "incident";
break;}
case "change request":
{ table = "change_request";
break;}
}
api.emit('NAV_ITEM_SELECTED', {
route: "record",
fields: {
table: table,
sysId: "-1"
}
});
}
Create client state:
Add your above client script on dropdown events: