Set Date/Time Field in a form to current time

adam_cannon_23
Tera Contributor

I have a field in my form that is used to show when a ticket is resolved,

 

I need this field (when active) to be set to the current date/time

 

Tried the dynamic field in UI builder but this didn't work for some reason

1 REPLY 1

Amit Pandey
Kilo Sage

Hi @adam_cannon_23 

 

You can write a before/update business rule with condition when state changes to Resolved with following script-

 

current.u_resolved_date = new GlideDateTime(); //Enter the field value correctly

 

Please mark my answer helpful and correct.

 

Regards,

Amit