+ 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.

https://ap2.salesforce.com/services/data/v34.0/query/?q=Delete from Territory2 T Where T.Id not in (Select id from Org_00D28000000e2opEAA.territory2 where id is not null)