I'm trying to add roles to Stash for my company.

I created a package.xml (listed below) to get the roles. According to Metadata API Developer Guide: Role, there is a parentRole field which I'm not seeing.

Does anyone know how to access this when I pull the roles from my org, so that I can add them to Stash?

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  • I see you have API version 37.0 on the Package. What API version are you using for the API itself? – Daniel Ballinger Apr 28 '17 at 0:27
  • 1
    Can you see ParentRoleId with a direct SOQL query? Select Id,Name,ParentRoleId,DeveloperName from UserRole – Daniel Ballinger Apr 28 '17 at 0:32
  • @DanielBallinger - No. I thought that the default org role counted as a parent. It looks like it doesn't! – Kevin Apr 28 '17 at 1:14

I was expecting the default top-most org role to count as a parent which is does not and therefore the role i'm looking at technically does not have a parent.

For example,

           Default Org Role
                My Role

Since "My Role" is directly below the top-most role which is created by default for the org, it is not considered a parent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.