Hi @skolisetti ,
Please see the following (https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Default-Dates-in-Model-Driven-App-forms/td-p...) as this would need to be done with JavaScript.
Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew
Hello @skolisetti,
You can use below code
1. Login to https://make.powerapps.com
2. Expand Tables
3. Open the Form from the required Table
4. Then Click on Events --> Select OnLoad--> then Select New WebResource --> Create a WebResoure--> Paste the code which i mentioned
5. Then in onLoad Operation set the Function as SetToday make sure you selected Execution Context checkbox is selected
6. Save and Close then Publish
function SetToday(executionContext) {
var formContext = executionContext.getFormContext();
if (formContext.ui.getFormType() == 1) {
formContext.getAttribute(FIELDLOGICALNAME).setValue(new Date()); // new Date is for Setting current Date
formContext.getAttribute(FIELDLOGICALNAME).setSubmitMode("always"); // if field is disabled we can use Always to set the value
}
}
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com