We are trying to construct a transaction which
- creates or updates an object in a table (so we would like to use “Upsert” block), and
- adds relations to this object
But the transaction fails when the object to be upserted does not contain an objectId, the error info is:
code: 25016
message: "Unable to perform 'SET_RELATION' operation due to argument incompatibility. The operation references a result from another 'UPSERT' operation. The specified result cannot be obtained from this operation (objectId)."
However, when replacing the Upsert block with a Create block, the transaction runs just fine.
How is this possible? I thought Upsert would create an object in the database just as if we were using the Create operation block, and the operation result reference would contain the object that is being created (with objectId). But apparently not?
Below is the code we have… as you can see, the disabled block (Upsert) has exactly the same inputs as the enabled block (Create). But things fail when Upsert is enabled, Create is disabled.