2015年12月8日 星期二

CRM2011 Get Entity/Attribute's Display Name from CRM database

CRM2011 Get Entity/Attribute's Display Name from CRM database
從資料庫取得CRM2011 Attribute Display Name







  1. SELECT EntityView.Name AS EntityName, LocalizedLabelView_1.Label AS EntityDisplayName,
  2. AttributeView.Name AS AttributeName, LocalizedLabelView_2.Label AS AttributeDisplayName
  3. FROM LocalizedLabelView AS LocalizedLabelView_2 INNER JOIN
  4. AttributeView ON LocalizedLabelView_2.ObjectId = AttributeView.AttributeId RIGHT OUTER JOIN
  5. EntityView INNER JOIN
  6. LocalizedLabelView AS LocalizedLabelView_1 ON EntityView.EntityId = LocalizedLabelView_1.ObjectId ON
  7. AttributeView.EntityId = EntityView.EntityId
  8. WHERE LocalizedLabelView_1.ObjectColumnName = 'LocalizedName'
  9. AND LocalizedLabelView_2.ObjectColumnName = 'DisplayName'
  10. AND LocalizedLabelView_1.LanguageId = '1033'
  11. AND LocalizedLabelView_2.LanguageId = '1033'
  12. AND EntityView.Name IN ('Account','Contact')
  13. ORDER BY EntityName, AttributeName


reference from: http://jianwang.blogspot.tw/2009/03/get-entityattributes-display-name-from.html

沒有留言:

張貼留言