Tuesday, 7 July 2015

Get the Datatype of attribute using JavaScript in CRM 2013/2015

Hi,
 
We can get the datatype of the attribute using JavaScript in CRM.
 
Here is the syntax for it.

Xrm.Page.getAttribute("<AttribueSchemaName>").getAttributeType()

This method will return one of the following string values
  • boolean
  • datetime
  • decimal
  • double
  • integer
  • lookup
  • memo
  • money
  • optionset
  • string 
Hope this helps

--
Happy CRM'ing
Gopinath

No comments:

Post a Comment