web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Has setFormDirty deprecated in Model Driven Apps (UCI)

(0) ShareShare
ReportReport
Posted on by 193

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

I have the same question (0)
  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at

    Hi Balaji Karpurapu,

    setFormDirty is not a supported JavaScript function. Use getIsDirty, getSubmitMode and setSubmitMode instead.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 41

#2
Martin Dráb Profile Picture

Martin Dráb 36 Most Valuable Professional

#3
Satyam Prakash Profile Picture

Satyam Prakash 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans