I'm developing a NodeJS app which queries Dynamics 365 using the Web API (oData).
I need to create an account entity, a contact entity and then a connection entity which will link the two together. I would like this to happen atomically so that if any of these fail, then they all fail.
The connection entity needs to know the accountid and contactid in advance, which means it must occur after the creation of the account and the contact
I'm aware of the batch command which lets you create multiple entities atomically but it does not look like I can pass the result of one request to the payload of another.
Is it possible to do such a request atomically over a web interface and if not, what fallbacks could I use to approximate atomic transactions?
 
    