Problems deploying a Role with a Parent Role using a Change Set - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Support TeamSupport Team 

Problems deploying a Role with a Parent Role using a Change Set



I am attempting to deploy a change set which includes several Dashboards and Reports, which reference a couple of new Roles which i have also included in the changeset.

However the changeset fails to deploy with errors on the Dashboards and Reports which reference one of the roles saying that one of the Roles could not be found, like:

Dashboard_Reports Folder 6 15 In field: role - no Role named Motoring_Display_Manager found
Performance_Dashboards Folder 6 15 In field: role - no Role named Motoring_Display_Manager found

It seems like the change set is failing to deploy the components with the independent objects first - in this case the Roles before the Dashboards and Reports.

One of the two roles in question has the other role as the parent role (Motoring_Display_Manager is parent of Motoring_Sales) - so perhaps the issue is with the changeset deploying the Roles in the incorrect order?

I did manage to deploy the change set by deploying the Roles first using Eclipse (i was using the same user to deploy the change set as to deploy the Role objects using Eclipse - a System Administrator with View All and Modify All checked, as well as all the change set permissions).

I am wondering if anybody else has experienced this issue or similar before?

Cheers!

Robin Smith
Phillip SouthernPhillip Southern
Robin, change sets are a great feature but still relatively new for the platform ( < 2 or 3 years I think?) I've ran into this several times and the solution was always breaking up the change set and doing multiple pushes.  

Another example is a push with a trigger, class, and test class.  Code was simple, but the change set still didn't recognize that I had all three in the change set.  I would get an error saying for the class reference in the trigger...that the class wasn't found.  So I had to push the class, then do another push with trigger and test class.

So when in doubt either break up the change set into multiple ones...or use eclipse to push.
Sharif ShaalanSharif Shaalan
Hi Robin, yes, what you did is correct.  Since you cannot choose the order of the deployment when you run into these types of errors it is best to break the deployment into smaller changes sets i.e.

Deploy parent role, then deploy other roles, then deploy the dependent reports and dashboards.