How to avoid use of sys_id in Client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 02:45 AM
Hi,
What is the best practice to avoid use of sys_id in client script.
E.g. onChange of category wanted to set assignment group to ABC.
if(category=='Test')
{
g_form.setValue('assignment_group', '196589360f6471008fdcfa6ce1050e3a(sys_id of ABC)', 'ABC');
}
How to avoid use of sys_id here, as we can not use gs.getProperty in client script? Any idea ?
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 02:55 AM
use display business rule and set the sys_id on a scratchpad variable....access the scratchpad in client script.
BTW, why cant you use property?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 03:00 AM
gs is server side object we cant use in client side. The only way is use sys_id.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 03:08 AM
Yes you can use gs.getProperty Not kidding but just make use of a ajax call and have it in a script include .... If you want to save the server round trip, make use of display business rule + scratchpad..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 03:39 AM
Thanks everyone for the reply.
Display business rule + scratchpad will be good solution.