最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

[AX2012] Fetching a Label value from SQL

网络文摘 William 1616浏览 0评论

Coming from my previous blog post Get list of security roles with name , I extracted the label via SQL. I had to break up the Label ID into the Module and then the number.
This allowed me to then query the table ModelElementLabel to get the label value

Following code can get the Label via SQL
NOTE: you need to query the Model database for this

DECLARE @LabelStr as nvarchar(50)
Set @LabelStr = N'@SYS12345'

select * from ModelElementLabel L
    where L.Module = SUBSTRING(@LabelStr, 2, 3)
          and L.LabelId = SUBSTRING(@LabelStr, 5, 7)
        --and L.Language = 'en_us' -- Uncomment this line to filter by language

This way you wont need to search a label value from within Ax

Filed under: Uncategorized

转载请注明:ww12345678 的部落格 | AX Helper » [AX2012] Fetching a Label value from SQL

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址