Skip to Content
1
Aug 14, 2020 at 02:42 PM

$Batch Operation in OData for Account

216 Views Last edit Aug 17, 2020 at 11:12 AM 2 rev

Hello,

I'm trying to have batch operation for Account which includes services CorporateAccountCollection, ObjectIdentifierMappingCollection and CorporateAccountIdentificationCollection. I'm getting error message "Creation of entities with different authorization is not allowed in single transaction using this service." Here is my body:

--batch

Content-Type: multipart/mixed; boundary=changeset

--changeset

Content-Type: application/http

Content-Transfer-Encoding: binary

POST CorporateAccountCollection HTTP/1.1

Content-Type: application/json

Content-ID: 2

Content-Length: 10000

{ "Name":"Testing Batch Operation MB", "RoleCode":"CRM000", "CountryCode":"US" }

--changeset

Content-Type: application/http

Content-Transfer-Encoding: binary

POST ObjectIdentifierMappingCollection HTTP/1.1

Content-Type: application/json

Content-ID: 2 Content-Length: 10000

{ "RemoteIdentifierDefiningSchemeCode": "888", "RemoteBusinessSystemID": "CAMS", "RemoteObjectID":"M.123456.0000" }

--changeset

Content-Type: application/http

Content-Transfer-Encoding: binary

POST CorporateAccountIdentificationCollection HTTP/1.1

Content-Type: application/json

Content-ID: 2

Content-Length: 10000

{ "IDTypeCode":"Z001", "IDNumber":'9999999999' }

--changeset--

--batch--

Do we need to reference the account object id from first call?

Thanks.

Regards,

MB