0
votes

Could someone point me to documentation that shows how to create a record in a model with one to many relation via client side script.

Thanks in advance!

1

1 Answers

0
votes

There are two ways of creating a new record.

1. Via a client-side script

You can do this by calling a createItem function from a widget. This link might help with that.

2. Via a server-side script

You can do this by directly creating a new record, assigning it to the relation of a model and then saving that model. This link might help with this method. By the way, it's easier to do this in a server-side script, as the guide itself says.

Since you just requested the link to official documentation, I've limited my answer to links only. Please feel free to ask if you need clarifications!