How do we identify a new record in client scripts

yalamanchili_sv
Kilo Contributor


Hi,

 

I have a requirement to calculate the Expected Resolution date value for one of the field in the form for the new records only when we change some value to the other field.

I am planning to write a client script for that, and not sure how do I identify a new record. I came to know in the Business Rules, we can identify, based on current.isNewRecord(). But the current object is undefined in client script. Can you please suggest me how do I identify a new record using the client script.

 

thanks in advance

3 REPLIES 3

Jim Coyne
Kilo Patron

It worked for me. Thanks a lot.


Nisar2
Mega Guru

This holds true even after 5 years. As a new developer in the world of ServiceNow, this helped me.