Creating Security Roles in XML

Hi all,

I've looked for documentation on this, but can't find it anywhere.


Is there any documentation on how to create a CRM security role in XML from scratch?


What do the different parts of the XML relate to?

Comments

  • Hi Liz,

    The easiest way to do it is to create the role in the front end, then use the 'export role definition' task to create an XML file.

    Then you could import that same XML into another environment.

    You could build a SQL query to generate it for you, but that would probably be more work than just doing it in the front end.

    If you want an example to go by, I have attached one from the BB sample database.

    The format is pretty simple.
    Annual Fund Manager.xml

    Joseph Styons

    https://www.styonssoftware.com
  • Hi Joseph Styons‍ , thanks so much for the reply :)

    Do you mean using the Add and this form? The functiaonality im interested in is what is in the XML for the role - see below sample.

    I"m interested in what the ID and Feature ID represent and how they relate to the dataform id's




    <SystemRole>

    <RecordInformation>

    <ID>0F5D3092-9xxxxxx10C787FA0E</ID>

    <Name>Security role</Name>

    <Description>Defines Permissions etc...

    </Description>

    </RecordInformation>

    <FeaturePerms>

    <DataForms>

    <DataForm>

    <FeatureID>036AA82Cxxxxx79</FeatureID>

    <GrantState>Grant</GrantState>

    </DataForm>

    <DataForm>

    <FeatureID>0A9D7CxxxxxC0D97B</FeatureID>

    <GrantState>Grant</GrantState>

     
  • Just a guess but I would say the ID is the GUID for the system role and the Feature ID relates to the feature that the security role is specifically listing to grant or deny permission.

    I usually follow Josephs recommendation when creating security roles and do not create them from scratch though.