gr.update isn't updating record in service portal

Daniel Voutt
Tera Contributor

Hi,

 

I've created a new widget that is a button that when pressed it will populate a field with current date and time and update the record.  Unfortunately, it's not actually saving the record - the value is being passed to the field and if I manually save the record with the OOTB save button the value appears, however my button isn't doing the save part.  Can anyone shed any light on this?  Any guidance would be appreciated.

 

Thanks in advance - Dan

 

2 REPLIES 2

AakashG1819
Tera Contributor

Hi @Daniel Voutt,

Hope you are doing well.

 

Proposed Solution

As per the snapshot of the code that you've shared, I reviewed it thoroughly and can see that you've opened 4 Curly Brackets, but only 3 were seems to be Closed, missing 1 Closed Bracket. Hence, I recommend you to re-check all the open and closed curly brackets. With this, I can see that it is showing some red color on Line No. 21 which may be resulting an error and highlighting you to close that 1 open curly bracket that you may be forgot to close.

 

If you find this information/knowledge/solution helpful, please don't forget to mark my solution as helpful and Accepted as a Solution.

 

Thanks 🙂

Aakash Garg

ServiceNow Developer

Community Alums
Not applicable