How to get the type of attribute on CRM using Javascript ?

getAttributeType

Returns a string value that represents the type of attribute.

This method will return one of the following string values:

  • boolean
  • datetime
  • decimal
  • double
  • integer
  • lookup
  • memo
  • money
  • optionset
  • string

getFormat

Returns a string value that represents formatting options for the attribute.

This method will return one of the following string values or null:

  • date
  • datetime
  • duration
  • email
  • language
  • none
  • phone
  • text
  • textarea
  • tickersymbol
  • timezone
  • url

 

Application Field Type Format Option Attribute Type Format Value
Date and Time Date Only datetime date
Date and Time Date and Time datetime datetime
Whole Number Duration integer duration
Single Line of Text E-mail string email
Whole Number Language optionset language
Whole Number None integer none
Single Line of Text Text Area string textarea
Single Line of Text Text string text
Single Line of Text Ticker Symbol string tickersymbol
Single Line of Text Phone string phone
Whole Number Time Zone optionset timezone
Single Line of Text Url string url

Source : https://msdn.microsoft.com/en-us/library/gg334409.aspx#BKMK_getAttributeType

Leave a Reply

Your email address will not be published. Required fields are marked *