Hello
The default duration for a call in my form is set at 30. We want this to be null and set as a business required field. I am ok with the business required part but struggling with the default value. I assume I will need to add son JS on the event load but wouldn't know where to start...
Thanks
If you're using MS Dynamics 365 Version 9.X, then you can use below code to set the"Duration" field to null:
//Call this function on form load
function onFormLoad(executionContext) {
setActualDuration(executionContext);
}
function setActualDuration(executionContext) {
var formContext = executionContext.getFormContext(); // get formContext
var duration = formContext.getAttribute("actualdurationminutes").getValue();
formContext.getAttribute("actualdurationminutes").setValue(null);
}
How to register the function:
Can you please tell me which version of MS Dynamics (365/CRM), you're using?
Regards,
Muhammad