Associate and disassociate request is used to link and unlink records having relationship. We can link and unlink records depending on their relationship type, for example, we can link records having 1:N using update request (setting lookup). In our earlier sample, we demonstrated how we can update lookup field using Web API. In this post we are going to discuss associating and disassociating N:N relationship.
Let’s say we have a custom entity called Building and which is related to account using N:N relationship, so a single account can be related to multiple buildings, similarly single building can be related to multiple accounts.
So if we need to associate account record with building entity record we write POST request using the following syntax and can set target GUID as object: