- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2021 01:02 AM
Hi all,
Our users maintain certain CIs by Catalog Items. In my case, when they ask for CI modification, we load all updateble CI data on variables, user updates some of this data and, after approval, the CI data is updated automatically by a script.
Certain CIs have a lot of updatable data and approver only wants to review the data that has been updated. To achive this We store, in a hidden variable, the original loaded data of the CI and, onSubmit, we compare it with the submitted data and populate the changes in a changes variable with the g_form.setValue instruction.
This method works in UI but it doesn't work in SP. Is there any way to inform a varible value in a onSubmit Catalog Client Script in SP?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2021 03:20 AM
The problem is the getMessage call.
It's an asynchronous call so script ends before receiving the message so field is submitted without being updated.
It's necessary to preload the message in order to avoid an asynchronous call on Submit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2021 01:15 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2021 01:40 AM
Hi,
Did you already tried what Rohila has mentioned?
Thank you
Prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2021 03:19 AM
My Script is already marked as all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2021 03:25 AM
Can you share your script
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP