Fetch dynamic sys_id of catalog items into virtual agent activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 07:31 AM
Hi Folks,
Thank you for your help in advance. There is one requirement for me. I am trying to fetch catalog items link into VA activity, the use case is whenever the user selects the catalog item, it has to fetch the catalog item link from one of the customized table and provide the link for the user to submit the item in a new window.
Current logic used in widget is:
genAccessForm.url = '/esp?id=sc_cat_item&sys_id=' + findAccessMethod.u_install_cat_item.sys_id;
Tried the possible ways below:
1.
var selectedCatalogItem = vaInputs.application_list.getValue();
if(selectedCatalogItem){
var catalogItemLink = '/esp?id=sc_cat_item&sys_id=' + selectedCatalogItem.sys_id;
gs.info(catalogItemLink);
}
else{
gs.info('Catalog Item not available');
}
2. (function execute() {
var catalogItemLink = '/esp?id=sc_cat_item&sys_id=' + vaInputs.application_list.sys_id.getValue();
gs.info(catalogItemLink);
return '';
})()
Please help me like which activity I have to use it and where I am going wrong?
Regards,
AD.