function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tarique Waseem 1Tarique Waseem 1 

Insert/Update/Delete in Enterprise Territory object


I am trying to insert a new Territory into Salesforce Territory using WSDL. It is giving me [ { "message" : "unexpected token: INSERT", "errorCode" : "MALFORMED_QUERY" } ]  error.

Please help me as I am new to Salesforce CRM.

Check debug log to confirm exact issue on your code what it is displaying in details. Or which statement you are causing the exception 
Tarique Waseem 1Tarique Waseem 1
Hi ViruS,

I am executing the following query to delete the territories which has been deleted from the local PostGraySql DB. from Territory2 T Where T.Id not in (Select id from Org_00D28000000e2opEAA.territory2 where id is not null)