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 CRM (Archived)

EntityForm Dirty

(0) ShareShare
ReportReport
Posted on by 2

Hi,

I got the request to show the submit button only when at least one field on the entity form in the portal has been changed.

Considering we have a lot of fields on the form, what would be a good option to hide the button, and show only when a change has been made?

I guess this this will involve javascript, but not sure about the exact implementation to make it work for every field.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Refer this:

    crmprof.wordpress.com/.../ms-crm-2011-what-is-the-isdirty-property

  • Birgit RD Profile Picture
    2 on at

    The reference is for CRM whereas I'm working on portals.

    I think I'll use following script as a base on the portal web page:

       $('form :input').change(function() {

               alert('change');

           });

    I still have to check as sometimes values are filled within code, which are not captured by the script.

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Birgit,

    You could write the following lines of code to check if the form has been modified.

    var isDirty = Xrm.Page.data.entity.getIsDirty();
    if(isDirty)
    {
    //Show the Submit button
    }
    else
    {
    //Hide the Submit button
    }

    Hope this helps.

  • Community Member Profile Picture
    on at

    i just disable button but you can change for hiding

    $(document).ready(function () {

       $("#UpdateButton").prop('disabled', true);

    });

    $("[onchange='setIsDirty(this.id);']").change(function() {

           $("#UpdateButton").prop('disabled', false);  

    });

  • Suggested answer
    oliver.rodrigues Profile Picture
    4,052 on at

    why not using a Web Form ? you could split the fields into your tabs

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans