diff --git a/Specialized Areas/Record Producer/Update Incident Record from Record Producer/README.md b/Specialized Areas/Record Producer/Update Incident Record from Record Producer/README.md new file mode 100644 index 0000000000..5858939c0b --- /dev/null +++ b/Specialized Areas/Record Producer/Update Incident Record from Record Producer/README.md @@ -0,0 +1,6 @@ +This code_snippet.js script enables seamless Incident record updates directly from a Record Producer. +Within the Record Producer, you can define specific record fields and specify which fields should be updated — all within ServiceNow, without any interruptions. + +Using this script, end users can easily update an existing Incident’s Short Description or modify an Onboarding Form — without requiring any Service Desk involvement or navigating to the record via Workspace or the Next Experience UI. + +This use case became a key highlight in one of our projects, showcasing how automation can enhance user experience and efficiency within ServiceNow. diff --git a/Specialized Areas/Record Producer/Update Incident Record from Record Producer/code_snippet.js b/Specialized Areas/Record Producer/Update Incident Record from Record Producer/code_snippet.js new file mode 100644 index 0000000000..b7c08d3db0 --- /dev/null +++ b/Specialized Areas/Record Producer/Update Incident Record from Record Producer/code_snippet.js @@ -0,0 +1,8 @@ +// This script script updates Incident Record from Record Producer +// Create a Record Producer and add script under producer script + +new global.GlideQuery('incident').where('sys_id', producer.incident_number).update({ + short_description: producer.short_description +}); +gs.addInfoMessage('Record Updated Successfully'); +current.setAbortAction(true);