I have 2 items :P1_START_DATE
and :P1_END_DATE
.
I need to display the current date in these two field when I double click the items, I need this through dynamic action.
Thanks! Abinnaya
You can create a Dynamic Action that triggers on Event: Double Click
, Selection Type: Item(s)
, and Item(s): :P1_START_DATE
for each of your items.
Then your True Action
should be Execute JavaScript
with the code like this:
var myDate = new Date();
var dd = String(myDate.getDate()).padStart(2, '0');
var mm = String(myDate.getMonth() + 1).padStart(2, '0');
var yyyy = myDate.getFullYear();
// Here you can format your date the way you want it to look.
myDate = mm + '/' + dd + '/' + yyyy;
apex.item("P1_START_DATE").setValue(myDate);