Pre-populate a record producer form after clicking link on the Catalog Item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 09:25 AM - edited 04-27-2023 09:26 AM
Hello Everyone,
I have a requirement when requester clicks on the description "LINK" it have a target to open a record producer "Create Incident".
I want to preset values with ""Urgency = High && Impacted Service = Access card"".
Can you please help me on how to code ?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 09:36 AM
Hello Vamsi,
You should be able to do this with an OnLoad Catalog Client Script. Something similar to this should work.
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.setValue('u_urgency', 1);
g_form.setValue('u_impacted_service', 'Access Card');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 09:43 AM
Hello @Joe S1
it should populate the values only after navigating from URL of previous catalog item only.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 09:47 AM
Sorry missed that,
You're going to need to set the values via the url, see if this previous post helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 10:13 AM
You will need to parse the URL parameters in an onLoad catalog client script. The following article explains how to do it: https://servicenowguru.com/scripting/client-scripts-scripting/parse-url-parameters-client-script/
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/