I can't for the life of me figure out or find any documentation for how to create an record and associate it with another record in a many-to-many relationship through the web api.
Similar as the example in https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/create-entity-web-api#bkmk_CreateRelated under "Associate entity records on create" but with a many-to-many.
Let's say I have a entity called Class with a N:N to Student. If I wanted to create a new class with association to a couple of already existing students I assume I would do something like this:
POST: xxx.crm11.dynamics.com/.../classes
{
"students" : [{
"student@odata.bind" : "/students(00000000-0000-0000-0000-0000000001)",
"student@odata.bind" : "/students(00000000-0000-0000-0000-0000000002)"
}]
}
Would this be correct? Or am I misunderstanding something?