Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

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

  • Suggested answer
    Adrian Begovich Profile Picture
    1,025 Super User 2025 Season 1 on at
    RE: Has setFormDirty deprecated in Model Driven Apps (UCI)

    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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 181 Super User 2025 Season 1

#2
Siv Sagar Profile Picture

Siv Sagar 149 Super User 2025 Season 1

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 124 Super User 2025 Season 1

Product updates

Dynamics 365 release plans