I have a workflow action for setting a workflow status to completed.
As part of this I set up a custom status change screen for handling this which contains a few related fields.
One of these fields is a "Date Completed" field.
I'd like to initialise the on screen initial value of this field to the current date, but for the life of me I can't see a simple way of doing this.
Any helpful suggestions would be greatly appreciated.
(I don't want to use a trigger, as the user may update the date to something other than the current date.)
Tried using the onload method of the status change page.
Also tried a script element on the same page.
Neither of these worked, but I suspect I have note done this correctly, and have since removed both.
This can be achieved via client-side scripts.
As part of the onload event or page script components, execute the following script code:
Example:
$('input[name="InitiationDate"]').val(rbf_formatDate(new Date(),'MM/dd/yyyy'))
Identifiy the Date field control via its integration name. In the example above, Date field integration name is 'InitiationDate'.
Hope this helps.
Thank you for the tip!
I used the following in the onload event, and it works a treat!
$('input[name="DateCompleted"]').val("{!#TODAY}")
This can be achieved via client-side scripts.
As part of the onload event or page script components, execute the following script code:
Example:
$('input[name="InitiationDate"]').val(rbf_formatDate(new Date(),'MM/dd/yyyy'))
Identifiy the Date field control via its integration name. In the example above, Date field integration name is 'InitiationDate'.
Hope this helps.
You can use setting "Use current date plus NNN days as default value for updates and status changes", see Field Create/Edit page for Date and Date/Time fields.
Thank you for the tip!
I used the following in the onload event, and it works a treat!
$('input[name="DateCompleted"]').val("{!#TODAY}")