- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 02:30 AM
Hi Everyone ,
I am calling System Property inside UI Action. But whenever I adding system property in UI Action , UI Action stops working - it becomes non clickable.
System Property:
Note- Both System Property and UI Action are same scope
cc: @Ankur Bawiskar @Pavankumar_1
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 02:48 AM
that's correct. you need to have script include if you have to use GlideAjax.
I hope you can create script which uses GlideAjax and the required client callable script include
this link has the sample script; enhance it as per your requirement
How do I access the system property in UI page client script?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 02:38 AM
your UI action is client side and you are using gs.getProperty() which won't work in client side.
gs object works only in server side. so that's the issue
you better use GlideAjax and get the property value from there
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 02:45 AM
Can you please give any example. One doubt do I have to write script include for this.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 02:48 AM
that's correct. you need to have script include if you have to use GlideAjax.
I hope you can create script which uses GlideAjax and the required client callable script include
this link has the sample script; enhance it as per your requirement
How do I access the system property in UI page client script?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 03:21 AM
UI Action:
Script Include:
I am getting correct value in alert. But somehow when I am using in other place it is showing undefined.
Thanks