Run Update Set Commit from server script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2022 06:19 AM
Hi,
I would like to write a server side script that commits a specified (previewed) updated set. I looked at the UI Action for 'Commit' and found the following ootb code:
var ajaxHelper = new com.glide.update.UpdateSetCommitAjaxProcessor();
ajaxHelper.addParam('sysparm_type', 'validateCommitRemoteUpdateSet');
ajaxHelper.addParam('sysparm_remote_updateset_sys_id', grUS.sys_id);
ajaxHelper.getXMLAnswer(_handleResponse);
Since this is an Ajax helper, I cannot run this from a server side script.
Any suggestions on how I can execute the 'Commit' code server side?
Thanks
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2022 06:32 AM
Hi,
why to do this using a script and not UI?
What would you do with the errors/warnings?
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
‎06-16-2022 08:24 AM
Just exploring it right now; but if there are error/warning, they would need to be manually addressed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2022 05:56 AM
Hi,
I could not find the script include "UpdateSetCommitAjaxProcessor"
Seems it comes from platform level.
Unless we know how the function is written; it would be difficult to invoke it from server side.
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader