- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2020 09:12 PM
Hi,
I have a variable set in that created a variable called 'price' which is a single line text.( i want to use that variable set into multiple record producers)
for the variable price i want default value as sys id of that record producer.
i tried on degault value: , javascript:current.sys_id ,and producer.sys_id but no luck , please share if you have any idea on this.
Thank you
Shabbir
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2020 09:17 PM
Try with on load catalog client script:
g_form.setValue('price', g_form.getUniqueValue());
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2020 10:25 PM
Hi,
it worked for me in native and portal both
please share your client script and the script screenshot
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2020 08:39 PM
Did you accidentally mark other answer as correct?
The answer I shared works well for both native and portal.
You can mark only 1 response as correct.
So please mark appropriate response as correct so that it helps future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2020 02:01 AM
Did you accidentally mark other answer as correct?
The answer I shared works well for both native and portal.
You can mark only 1 response as correct.
So please mark appropriate response as correct so that it helps future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2020 10:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2023 10:46 AM
This works for this: javascript:current.default_value = current.cat_item;