i want to get only some fields data, not all fields data in form. if i change any field,only updated fields data i want to show by using javascript IsDirty().
Thanks in advance
Rajesh
*This post is locked for comments
i want to get only some fields data, not all fields data in form. if i change any field,only updated fields data i want to show by using javascript IsDirty().
Thanks in advance
Rajesh
*This post is locked for comments
Hi Rejesh,
yes this will return only updated field name in the form , modified as per your requirement , try with this .
var businessphone = ""; var email = ""; var name = ""; var allAttributes = Xrm.Page.data.entity.attributes.get(); if (allAttributes != null) { for (var i in allAttributes) { if (allAttributes[i].getIsDirty()) { var attrName = allAttributes[i].getName(); if (attrName == "businessphone") //Replace attribute name which you want var businessphone = Xrm.Page.getAttribute(attrName).getValue(); if (attrName == "email") var email = Xrm.Page.getAttribute(attrName).getValue(); if (attrName == "name") var name = Xrm.Page.getAttribute(attrName).getValue(); } } }
Hi Goutam Das, for example if i changed email, Bussiness phone, and Account name
i want to only updated fields data but not all fields data.
Thank you
Hi Rajesh,
Have a look at:
community.dynamics.com/.../identify-dirty-fields-on-microsoft-dynamics-crm-form
Hello Rajesh ,
Try with this -
//get list of dirty fields var allAttributes = Xrm.Page.data.entity.attributes.get(); if (allAttributes != null) { for (var i in allAttributes) { if (allAttributes[i].getIsDirty()) { listofDirtyAttri += allAttributes[i].getName() + "\n"; } } }
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,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156