You need to sign in to do that
Don't have an account?
Jaymin Sutarwala 7
Need help with SOQL query
Hi all,
I have written the following query in Opportunity Territory Assignment Apex Class. This query is not returning any result in the code. I tried execuring the query in Workbench but it is not returning any records.
I have written the following query in Opportunity Territory Assignment Apex Class. This query is not returning any result in the code. I tried execuring the query in Workbench but it is not returning any records.
SELECT Id, ObjectID, Territory2Id, Territory2.Territory2Type.MasterLabel, Territory2.ParentTerritory2Id FROM ObjectTerritory2Association WHERE SObjectType = 'Account' AND Territory2.Territory2ModelId = :activeModelIdHowever if I remove the condition SObjectType = 'Account' from the query and run it, it returns records. Any idea why the query is not working with the condition SObjectType = 'Account'
Can anyone help with this one. Stuck with this for couple of days now.