Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Move custom field value in ritm to approvers

LuLe Game
Tera Expert

Hello everyone
I need your help with the sysapproval_approver table. First I have a ritm (catalog item), and in this ritm I have a custom field (text field for comments). I would like to pass the value of this custom field to the comments field (highlated below) of the approvers through a Business Rule. But the script, and I have tried multiple ones, none have worked. Can anyone tell me if it can be achieved with a script or does it need to be done in a different way?

 

Capture1.JPG

6 REPLIES 6

Thanks Anvesh for your help, I think your approach can help but I have not tested. I already identify the issue before and it was just to add quotation marks, like below: 

...

gr_approvalinfo.comments = '' + current.u_customfield;

gr_approvalinfo.update();

}

@LuLe Game Adding those quotation marks will convert the value to string instead of a reference, and when we use getValue() it will return the field value as string only.

Thanks,
Anvesh