From 398197590a8196dd623a85d7254981e3e44fa325 Mon Sep 17 00:00:00 2001 From: TVani5 <30842729+TVani5@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:32:44 +0100 Subject: [PATCH 1/3] Create readme.md --- GlideRecord/comments on gr.update/readme.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 GlideRecord/comments on gr.update/readme.md diff --git a/GlideRecord/comments on gr.update/readme.md b/GlideRecord/comments on gr.update/readme.md new file mode 100644 index 0000000000..67fb682c18 --- /dev/null +++ b/GlideRecord/comments on gr.update/readme.md @@ -0,0 +1,3 @@ +Comments on gr.update via an optional parameter of why or from where it is being update. + +Reference of documentation link: https://developer.servicenow.com/dev.do#!/reference/api/utah/server/no-namespace/c_GlideRecordScopedAPI#r_ScopedGlideRecordUpdate_String?navFilter=update From 88f8f192db0869ae8a3bc99da36a2825c8b979ae Mon Sep 17 00:00:00 2001 From: TVani5 <30842729+TVani5@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:34:15 +0100 Subject: [PATCH 2/3] Create code.js --- GlideRecord/comments on gr.update/code.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 GlideRecord/comments on gr.update/code.js diff --git a/GlideRecord/comments on gr.update/code.js b/GlideRecord/comments on gr.update/code.js new file mode 100644 index 0000000000..b4b48b82f8 --- /dev/null +++ b/GlideRecord/comments on gr.update/code.js @@ -0,0 +1,5 @@ +var now_GR = new GlideRecord('incident'); +now_GR.get('99ebb4156fa831005be8883e6b3ee4b9'); +now_GR.setValue('short_description', 'Update the short description'); +now_GR.update(); +gs.info(now_GR.getElement('short_description')); From 3339e34d8179904a2fe8451321032c74a63de5d4 Mon Sep 17 00:00:00 2001 From: TVani5 <30842729+TVani5@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:34:56 +0100 Subject: [PATCH 3/3] Update code.js --- GlideRecord/comments on gr.update/code.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/GlideRecord/comments on gr.update/code.js b/GlideRecord/comments on gr.update/code.js index b4b48b82f8..7db966cbe1 100644 --- a/GlideRecord/comments on gr.update/code.js +++ b/GlideRecord/comments on gr.update/code.js @@ -1,5 +1,4 @@ var now_GR = new GlideRecord('incident'); now_GR.get('99ebb4156fa831005be8883e6b3ee4b9'); now_GR.setValue('short_description', 'Update the short description'); -now_GR.update(); -gs.info(now_GR.getElement('short_description')); +now_GR.update("updated from BR" ); // This comment gets added to the activity log of incident for audit purposes.