Difference between Xrm.Page.getControl(‘xyz’).getValue() and Xrm.Page.getAttribute(‘xyz’).getValue() in Dynamics 365 CRM

By | November 21, 2018

Many times while working in Dynamics 365 CRM we found small clues tips which sometimes becomes life saver for us. Today in this blog I will share one of such small tip.

If we enter special characters like # $ % & ( ‘ in text input the GetControl & Getattribute will give different result.

Example:

Xrm.Page.getControl(ikl_folderpath).getValue() returns /folderpath

Xrm.Page.getAttribute(ikl_folderpath).getValue() returns /folderpath#

Both the above statements return different results.

GetControl() method replaces the special characters # $ %  & ( ‘  to blank if it is placed at the end whereas GetAttribute() method doesn’t remove any special characters from the end and displays it as it is.

Hope this helps!

Generate Your Own New Leads Within Microsoft Dynamics 365 CRM

Contact us for a demo to know more about how Maplytics can help you to generate new leads from within Microsoft Dynamics 365 CRM.

Maplytics is a 5-star rated, preferred business app on the Microsoft AppSource that is Certified for Microsoft Dynamics 365 (CfMD) and comes with powerful features like Appointment Planning, Sales Routing, Territory Management, Heat Maps, Geo-analytical Dashboards and more that empower organizations to add more value to their CRM data, improve sales & service processes, and achieve high ROI.

Get your free trial from our Website or Microsoft AppSource!

‘If data is the new oil, location intelligence is ??”