1

I want to query the RoleInTerritory2 field from UserTerritory2Association sObject. I am logged in as System Admin profile but still not able to query this field. Starnge thing here is that I am able to query this via developer console. Does anyone have any idea reagrding it? It gives me an error : No such column 'RoleInTerritory2' on entity 'UserTerritory2Association'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

2

Got the problem. There was an API version conflict. It works for API versions 30 above.

| improve this answer | |
  • The class where I was trying to use UserTerritory2Association object, was of API version 30 which doesn't support it. I changed the API version for the class that solved my issue. – Smriti Kumari Dec 23 '15 at 12:07
  • Would you mind specifying which API version you changed it to? I tried this and it didn't solve my problem. – Swisher Sweet Oct 26 '16 at 18:05

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.