Notifications
Announcements
No record found.
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
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"; } } }
Hi Rajesh,
Have a look at:
community.dynamics.com/.../identify-dirty-fields-on-microsoft-dynamics-crm-form
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 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(); } } }
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2