Get list of security roles with name AX 2012

To get export the security roles along with the AOT name of the security will need you to either write something in X++ or go into SQL
I went the SQL route and this is my code:
1
2
3
4
5
6
7
8
9
10
11
select
S.AOTNAME, L.Text as AOTNAME, LD.Text as DESCRIPTION
from SECURITYROLE S
Left outer join ModelElementLabel L
on L.Module = SUBSTRING(S.Name, 2, 3)
and L.LabelId = SUBSTRING(S.Name, 5, 7)
and L.Language = 'en_us'
Left outer join ModelElementLabel LD
on LD.Module = SUBSTRING(S.DESCRIPTION, 2, 3)
and LD.LabelId = SUBSTRING(S.DESCRIPTION, 5, 10)
and LD.Language = 'en_us'
This will give a list of the AOT names and the Label name and Description

Comments

Post a Comment