delegateas / XrmMockup

Engine which simulates your exact Dynamics 365/CRM instance locally including all of it's logic!
Other
71 stars 28 forks source link

Compile errors on duplicate SecurityRole names #225

Closed mkholt closed 1 year ago

mkholt commented 1 year ago

Describe the bug It is possible to have multiple security roles with the same name in an environment (MS has recently rolled this out as part of a Marketing update)

When that happens, TypeDef tries to define the same property twice, and one of the roles will overwrite the other. We should make sure the name is unique when defining security roles.

To Reproduce Steps to reproduce the behavior:

  1. Have duplicate security role names
  2. Generate context
  3. See error

Expected behavior The security role names should be unique.

sjkp commented 1 year ago

Since you probably are not using those dublicate security roles for anything, you can just exclude the TypeDeclarations.cs file from the project (so you want get updates when it is generated a new in your pipeline). Then you can make your own ModifiedTypeDeclarations.cs and include that and then clean out the dublicates.