We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 303a732 commit be7adb4Copy full SHA for be7adb4
1 file changed
GlideRecord/Track any update on record/code.js
@@ -0,0 +1,24 @@
1
+(function executeRule(current, previous /*null when async*/) {
2
+
3
+ // Add your code here
4
+ for (var x in current){
5
+ if(x!='comments'&&x!='sys_mod_count'&&x!='sys_updated_by'&&x!='sys_updated_on'){
6
+ if (current[x] != previous[x]) {
7
+ var currVal=current[x].getDisplayValue();
8
+ if(current[x].getDisplayValue()==''){
9
+ currVal='empty';
10
+ }
11
+ if(x=='description'){
12
+ current.comments=current[x].getLabel() +' has been updated to ' +currVal;
13
14
+ else{
15
+ var prev=previous[x].getDisplayValue();
16
+ if(previous[x].getDisplayValue()==''){
17
+ prev='empty';
18
19
+ current.comments=current[x].getLabel() +' has been updated to ' +currVal+' from '+prev;
20
21
22
23
24
+})(current, previous);
0 commit comments