- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2024 01:30 PM - edited ‎08-29-2024 01:59 PM
Hi,
I am trying to call script include from list choice ui action and it is not working.
below is my code:
function selectedRecords() {
var asset_sysID = g_list.getChecked();
if (!asset_sysID || asset_sysID.length == 0)
return;
var assetRITM = new GlideAjax('global.ITEquipmentRequestUtils');
assetRITM.addParam('sysparm_name', 'assetRITM');
assetRITM.addparam('sysparm_passet_sysID', asset_sysID);
assetRITM.getXML(genEmail);
g_list.refresh(1);
}
function genEmail(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2024 02:36 PM
after changing g_list to current.sys_id it worked.
var sysID = current.sys_id;
var triggerEmail = new ITEquipmentUtils().getAssetRITM(sysID);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2024 02:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2024 02:09 PM
@AnirudhKumar I also tried that. please look at the code for details of that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2024 02:36 PM
after changing g_list to current.sys_id it worked.
var sysID = current.sys_id;
var triggerEmail = new ITEquipmentUtils().getAssetRITM(sysID);