Search code examples
dynamics-crmcrmmicrosoft-dynamicsdynamics-crm-onlinedynamics-365

Checkbox = true if specific field(s) are updated


I'm syncing Account and Contact information between Dynamics CRM 365 and QuickBooks Desktop.

What I'm trying to do in CRM is have a checkbox called something like "Address updated since last QB Sync". It is locked so the user can't touch it and should automatically be checked when a user updates specific fields: company name, address, phone, email.

Trying to do this with a business rule, but apparently does not seem possible. Would be the best way to handle this (web resource, business process, etc)?


Solution

  • What I ended up doing was creating a web resource and assigning it to the OnChange event of the fields I wanted to monitor for changes:

    function fieldChanged() {
      Xrm.Page.getAttribute("new_updatessincelastqbsync").setValue(true);
    }
    

    address1_composite was a bit tricky since it wasn't detecting the OnChange event. Had to add the field that comprise of the composite as hidden fields and add the web resource to the OnChange event for those. Now it is working 100%.