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:
