How to get Reference field values in scoped applications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 10:10 PM
Hi,
Actually i want to populate Assignment Group using current record reference field data , so in business rule it is working fine by using current.xyz, but while i am trying in Client script it is not working. Can we achieve dot walking in Client script? or can any one help me how ca we get reference fields data in client script or script include?
- Labels:
-
Customer Service Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 10:16 PM
Hi there,
Don't think this is a scoped applications issue like your topic title mentions.
Indeed you would need to use a Client Script and Script Include. Or g_scrathpad between a Business Rule and Client Script, if it's static data, could be better.
Here's an article which I wrote a while ago which describes using a Script Include with getXMLAnswer. Also contains detailed examples:
Client Side Scripting: Go for GlideAjax (with getXMLAnswer)!
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 10:18 PM
Hi,
In client script only single dot walking is allowed.
And if there is multiple dot walking you have to use client script and script include combination.
Thanks,
Dhananjay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 10:26 PM
Hi,
in client script you can only dot walk once.
There are other ways
1) GlideAjax and Script Include
OR
2) g_form.getReference() with callback method
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
‎08-01-2020 08:59 AM
Hi
To give you some "jump-start", you can have a look at exsitings forms, where something similar is implemented. That way, you can train yourself on how ServiceNow did the implementation.
BR
Dirk