create Record

Posted by abirRR on 05-Sep-2016 10:43

hi , 

is it possible to create with a rest call (as https://www.rollbase.com/rest/api/createRecord  or https://www.rollbase.com/rest/api/createArr  ) multible records that have foreign key (lookup field ) , please ?  

All Replies

Posted by Mohammed Siraj on 05-Sep-2016 23:14

Yes Abir, this is possible.

For the master object you can configure a trigger that creates and attaches related reocrds (assuming the related records also need to be newly created:) . Set this trigger timing as 'After Create'. Now whenever a master record is created via REST API, this trigger will run and attach related records for the newly created master record.

Alternatively:

1. Create related record also via REST API. API will return Record ID of this newly created record.

2. Next when creating the master record, set the relationship/lookup field value with the record ID from previous step.

3. Depending on your requirement, i.e. create multipe records or single record, you may consider using one of createRecord or createArr Rest API for both related record creation and master record creation.

This thread is closed