Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find and compare Security role by its id #185

Open
maerger opened this issue Feb 12, 2021 · 3 comments
Open

Cannot find and compare Security role by its id #185

maerger opened this issue Feb 12, 2021 · 3 comments

Comments

@maerger
Copy link

maerger commented Feb 12, 2021

We have set up a custom workflow action taking a lookup to a security role (role). In the organization service of xrm Mockup the the role with the id from the custom workflow action argument is not present. A role with the same name name exists but the id seems to be random.

Steps to reproduce:

  • Create a custom workflow action having a role lookup as input argument
  • Create a workflow using this CWA and set the role lookup to any existing security role
  • Set up a xrm mockup context and try to find the role in the mock organization service using the id provided in the cwa lookup

Environment

  • CRM/D365/CDS version: Online 9.2.21012.00146
  • Tool version: 1.7.5
  • Other applicable environments
@magesoe
Copy link
Collaborator

magesoe commented Feb 12, 2021

Security role ids are not identical in a given instance. XrmMockup behaves correctly in my opinion in that it forces you to compare security roles by name

@maerger
Copy link
Author

maerger commented Feb 12, 2021

Security role ids are not identical in a given instance. XrmMockup behaves correctly in my opinion in that it forces you to compare security roles by name

I think custom security role id's are identical at least on the root business unit. Checked this on our staging environments and seems to be the case. Is it good practice to compare security roles by name? For me this sounds kind of dangerous...

@magesoe
Copy link
Collaborator

magesoe commented Feb 12, 2021

Then I need to check that. I was always on the assumption that we had to check on name even though it sucks, because security role id's are not unique across environments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants