Hi All,
After creating a case record i am trying to assign it to myself, which throws following notification "Unsaved Changes", i am unable to find the route cause for the issue.
*This post is locked for comments
Hi Ganesh,
This error is coming when you are changing some field value in client side and forms become dirty and unable to redirect to update form until and unless you saved the data. You can check with below code to get the field name if you are not aware about which fields are changed but not saved.
//get list of dirty fields var entAttributes = Xrm.Page.data.entity.attributes.get(); if (entAttributes != null) { for (var i in entAttributes) { if (entAttributes[i].getIsDirty()) { listofDirtyAttri += entAttributes[i].getName() + "\n"; } alert(listofDirtyAttri); } }
When you are changing field from client side make sure you did setsubmit mode = always.
Xrm.Page.getAttribute("FieldName").setSubmitMode("always")
Once you change the field don't forget to call -
Xrm.Page.data.save()
Hope this helps.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156