- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2022 07:38 PM
Hi there,
I have an issue retrieving sys_id that is stored in system properties. As you can see on the pictures, I'm trying to set a value for hidden assignment group that I call in record producer. For some reason using g_scratchpad didn't work at all. If I replace g_scratchpad with sys id like 'das89asd89ad', it picked up the correct group. It's not best practice to hardcode sys_id but I can't make the scratchpad work. Any alternatives or solutions?
Attached are display business rules and client script images.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2022 07:31 PM
@Eric Hartojo since this is a record producer (catalog item) and not a table so display BR may not work, you will have to use GlideAjax.
If it would have been a client script on some table and not catalog client script, your BR would have worked perfectly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2022 07:46 PM
members have already suggested to use onLoad/onChange + GlideAjax
what did you start and where are you stuck?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2022 07:56 PM
Hi @Eric Hartojo,
You can retrieve the sys_id from System property in record producer scripts and assign values.
If you need it to change client scripts then you have to use the Client callable Script include and GlideAjax call to retrieve it and use it to change client scripts.
Take a look at once of my article - System Properties & it's Usage
It will help you to serve your purpose.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2022 06:21 PM
Hi @Sagar Pagar ,
I used Display Business rule with g_scratchpad variable method but it didn't work as I mentioned on the question. Didn't know if I miss something. Do I have to use GlideAjax?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2022 07:31 PM
@Eric Hartojo since this is a record producer (catalog item) and not a table so display BR may not work, you will have to use GlideAjax.
If it would have been a client script on some table and not catalog client script, your BR would have worked perfectly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2022 07:46 PM
members have already suggested to use onLoad/onChange + GlideAjax
what did you start and where are you stuck?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
