Please help in understanding below points

  • I am using Territory 2.0 and I can use SOQL but not SOSL. Why?
  • Below 2 URL is conflicting in using DML operation. Please help in understanding. Please note 1st URL with list of objects that dont support and 2nd URL about Territory 2.0 object.



Please let me know any issues.


1 Answer 1


The first reference indicates the SObjects where an APEX class can not perform DML statements like insert, update, delete, upsert or the equivalent Database.insert(..), etc method calls. Territory2 and UserTerritory are excluded from APex DML.

The second reference is a list of all SObjects available for manipulation by the SFDC SOAP or REST API

However, an APEX class can use the SOAP or REST API via Apex HTTP callouts upon the same org and do the DML operations permitted in the second reference. In your example, for SObject Territory2

create(), delete(), describeLayout(), describeSObjects(), query(),
retrieve(), update(), upsert()

That said, you won't be able to mock any testdata for these SObjects in a testclass; instead, you'll have to mock SObjects in memory.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .