Recently we made some modifications to a client’s environment which involved redesigning the use of custom forms and some scripting that we had written to pre-populate some fields on those forms. As a consequence we no longer required certain custom security roles that we had created for some users that were accessing the forms. Deleting these roles turned out to be not such a good idea.
A few days later we wanted to make some edits and publish the Case, Account and Contact forms but they kept failing. Publish all customizations were failing also. But publishing customizations for any other entity in the system was successful. The error message we were receiving simply put wasn’t very insightful; I won’t reproduce it all here but the key element was as follows:
<Message>role With Id = 97a24b0d-68e4-e011-8ee1-1cc1deea2f87 Does Not Exist</Message>
Additionally the human versions of the text file error message were equally cryptic. What really threw us was the ‘role with Id’ – we figured this to be a User Role, but in was in fact a security role.
So after some head scratching we finally figured out the scenario that caused the issue and then we solved the problem.
Scenario that created the issue:
- Create Custom Security Role.
- Create Custom Form
- Assign Security Role to the Form.
- Delete Security Role.
- Entity will not publish.
- Open up the problem custom form.
- Save As a new form.
- Delete problem form.
- Publish successfully.
The moral of the story? – Remove a security role from the form before you delete the security role.