How to populate logged in user's account in Account variable and set issue type in a catalog item.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 09:32 PM
The requirement is to populate the Logged in user's 'Account' to the account variable and set the Issue type as 'Network' when user goes to the Product Catalog item.
Here's the code which I tried.
var url = document.URL.parseQuery();
if(url=="")
{
g_form.setValue('account',g_user.account);
var issue = getParameterValue(url,'issue_type');
if (issue) {
g_form.setValue('network', issue);
}
}
}
function getParameterValue(url,name) {
if (url[name]) {
return decodeURI(url[name]);
} else {
return;
Thanks & Regards.
Sreesh Surendran
ServiceNow - CSM & Integrations
0 REPLIES 0
