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
Joris ArtoisJoris Artois 

Insert / Update UserTerritory object via (Bulk) REST API

Hi all,

Via APEX a DML Operation is not allowed on the UserTerritory object, but we want to inesrt / update / delete it via a custom tool that's build in APEX.
Therefore we were thinking of using the REST API. This seems to work only for one record at a time. Is it possible to do this with a List?
If not, I guess we should be using Bulk API? I have no experience with that, could you provide an example with OAuth2?

Thanks in advance,
Joris
mahesh.sidhu58@gmail.commahesh.sidhu58@gmail.com
Try SObject Tree API

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_composite_sobject_tree.htm