
Hi There,
When migrating CRM applications from the Classic UI to UCI (Unified Client Interface) Model-Driven Apps, you may encounter issues with the setFormDirty function, as it has been deprecated in the UCI. However, Are there any alternative approaches to achieve similar functionality in UCI?
The below code will switch to the correct form. fContext.data.setFormDirty(false); is not working in UCI. Any alternate to meet same functionality
if (targetForm != null) {
if (currentForm.getId().toLowerCase() != targetForm.getId().toLowerCase()) {
fContext.data.entity.attributes.forEach(function (attribute, index) {
if (attribute.getIsDirty()) {
attribute.setSubmitMode("never");
}
});
fContext.data.setFormDirty(false);
targetForm.navigate();
return true;
}
}
Please help with this
Hi Balaji Karpurapu,
setFormDirty is not a supported JavaScript function. Use getIsDirty, getSubmitMode and setSubmitMode instead.