auto populate date field with latest approval date

BenjaminY
Tera Contributor

My requirement is to auto-populate the 'last_application_date' field with the 'cp_start_date' field from the last request submitted previously with the same 'a_number' field as reference. This field will be read-only on the backend table view only for new records.  Please advise. 

 

 

When to Run:

Before: Insert

last_application is empty

script below:

BenjaminY_0-1736313369218.png

 

5 REPLIES 5

Muhammad 1
Tera Contributor

@BenjaminY 
Used the after-insert action for the Business Rule instead of the before-insert action. This is because if you use the before-insert action and try to update a record in another table using GlideRecord, it will not work. Instead, use the after-insert action and assign the necessary values in your script before calling current.update()

 

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards
Muhammad Junaid