getting a date field to auto populate when a new record in a related list created

patricklatella
Mega Sage

Hi helpful friends!

I previous opened a thread with a question to get a date field to auto populate when any change to a form is made, and it worked.   However it does not autopopulate if the first thing that is done on the form is to create a new record from a related list on the record.   Is this possible?

1 ACCEPTED SOLUTION

Ahh !!


I totally forgot that you are using scoped application


replace the below line


gr.date_reviewed = gs.nowDateTime();



with



gr.date_reviewed = new GlideDateTime();


View solution in original post

20 REPLIES 20

patricklatella
Mega Sage

here's my code, do I need to have the "condition" field different?



find_real_file.png


Your conditions should be



current.parent.date_reviewed.nil()


condition should be current.parent.date_reviewed


patricklatella
Mega Sage

thanks again so much for your help...changed the condition



getting this alert now



find_real_file.png


Ahh !!


I totally forgot that you are using scoped application


replace the below line


gr.date_reviewed = gs.nowDateTime();



with



gr.date_reviewed = new GlideDateTime();