Get Attribute Logical Name from Display Name: CRM 2011 and CRM 2013 On-Premise\IFD using query

Recently wanted to get logical names of 25 columns at one go. Business analyst provided us with display names. One colleague of mine quickly told me about a workaround from database to read all at one go

Select ll.Label, Attr.LogicalName From LocalizedLabelAsIfPublishedView ll

INNER JOIN Attribute attr

ON ll.ObjectId = attr.AttributeId

INNER JOIN EntityView ev ON ev.EntityId = attr.EntityId

WHERE ev.ObjectTypeCode = EntityTypeCode and ll.ObjectColumnName in (‘DisplayName1’,

‘DisplayName2’)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s