The field value is visible in the form but not in list/activity log/show xml

RohitN244878896
Giga Expert

Based on our requirement the service will be updated based on circuit id and product group will be updated based on service. Both logic are written in an client script. And the client script is working and I can see the values getting updated in the respective field.
But when I see the same field value in list it is empty, and there is no activity log for that field change and when i click on show xml also it is not there. Once I explicitly save the incident record again then only all are getting synced.
Why this behaving like this? Can anyone help me resolving this issue?

RohitN244878896_0-1782557289422.png

RohitN244878896_1-1782557471315.png

 

2 REPLIES 2

Danish Bhairag2
Tera Sage

Hi @RohitN244878896 ,

 

Can u tell us what type of client script it is? if its an onLoad or onChange script then on the form it will show the value but it wont get saved into the database as client scripts works on front end. In order to save it to the database u need to save it in the client script explicitly. If possible pls share the client script logic as well.

 

Thanks,

Danish Bhairagdar

 

Thanks,

Danish Bhairagdar

Tanushree Maiti
Tera Patron

Hi @RohitN244878896 

 

1. In Native UI -> go to form layout and check if the field is dot walking field. If yes,

The issue can happen because ServiceNow Client Scripts cannot directly save changes to dot-walked fields belonging to a different table. When you modify a dot-walked field via a Client Script, the value is updated on the screen, but clicking "Save" on the Incident record only updates the Incident table itself. The parent record containing that dot-walked field remains untouched until you forcefully interact with it.

 

2.  If your logic runs on an onLoad client Script, it will visually populate the field every time you open the form, but it will never save to the list view unless a user explicitly saves the record.

 

If you are trying to save any value at client level, try to let the server handle it using a Before Insert/Update Business Rule.  

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti