You need to sign in to do that
Don't have an account?

OpportunityTerritory2AssignmentFilter Global Interface
Recently turned on the Enterprise Territory Management functionality and I'm trying to get the Apex Class setup and keep getting an error message. I've copied the example code from the Apex Developer Guide (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_TerritoryMgmt_OpportunityTerritory2AssignmentFilter.htm#apex_interface_TerritoryMgmt_OpportunityTerritory2AssignmentFilter) and it's not working.
I keep getting the following error:
No such column 'Territory2Id' on entity 'Opportunity'. 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.
I keep getting the following error:
No such column 'Territory2Id' on entity 'Opportunity'. 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.
Error 1
System.QueryException: List has no rows for assignment to SObject
Stack Trace
Class.IntacctIntegrationContactToContact_Test.testVisualforceContextHappyFlow: line 51, column 1
Error 2
System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: a0vd00000095vF2: []
Stack Trace
Class.MassReassignOpportunitiesController.testReassign: line 202, column 1