I'm using the SOAP API to create two records with a createArr call:
Record 1 is object A with a lookup field (related object set to object B)
Record 2 is object B
There is a one to many relationship set between object A and B.
The question is -
Is it possible to create these two records with a _single_ call to the createArr method?
The reason why I'm asking is because I have no id value for the parent record (Record 1) when defining the child record (Record 2) fields because the parent record has not yet been created.
This is not supported as of now
What you can do is create the first object using SOAP method create(). The return type of the create() is the ID of the newly created record so you can pass this to the second create() you need. Please see Rollbase User Guide, Chapter 14: "References".
Please try rbv_api.setSharedValue() and rbv_api.getSharedValue()
This way you should be able to pass values (ID of parent record) from record to record while in the same database transaction.
Thank you. Is there any way to achieve this using the REST API?
This should work for REST API createArr as well.