0

I am needing to associate contacts entity to multiple studios(studios is a custom entity). I am using a lookup field in contacts entity, contact.studioid to do the same.

I am able to associate initially then replace Studio associations using Web API using this contact["studioid_odata.bind"] = "/studios(GUID)" line in my Web API JSON body which works well to replace the studio.

I would like to know how to associate a new studio to the contact on each call, without replacing it.

2 Answers 2

1

If entity is custom then it will have some prefix on the start like "new_". Anyway my recommendation is to use CRMRestBuilder to build your request - https://github.com/jlattimer/CRMRESTBuilder/releases/tag/2.6.0.0

0

If the Contact has a studioid then your relationship is the wrong way round as this means that a Contact can only have a single studio

You need to create another relationship between the contact and studio entities. Depending on your requirements, this can be (from the Contact record) a

  • A 1:N Relationship; or
  • An N:N Relationship

Not the answer you're looking for? Browse other questions tagged or ask your own question.