The answer, unfortunately, will not be. The CRM paradigm regarding many tables / relationships is that they are available for Association and Disassociation , but not for Create , Update or Delete queries. (In fact, there are no real Update in the intersection table - new associations are created either only ( Create => Associate ) or dissolved ( Delete => Disassociate ).)
You can verify this in this way by looking at the AttributeMetadata for your intersection object, and you will see that all attributes in your entity have the ValidForUpdateAPI and ValidForCreateAPI set to false. This is different from regular objects that have a combination of attributes that are valid for updating and making calls.
To solve your problem, your options are limited:
1) Register your move against the Association message. This message, unfortunately, cannot be filtered for specific objects, so you will have to filter all requests made in CRM through this plugin. IPluginExecutionContext has a Link property in the InputParameters property InputParameters , which you can use to filter the relationships you want to develop for your code.
Relationship entityRelationship = (Relationship)context.InputParameters["Relationship"]; if (entityRelationship.SchemaName = customIntersectTable.EntityLogicalName) { EntityReference targetEntity = (EntityReference)context.InputParameters["Target"]; EntityReferenceCollection relatedEntities = (EntityReferenceCollection)context.InputParameters["RelatedEntities"];
2) Create a custom intersection object that has one to many relationships with Opportunity and your custom intersection object (similar to something like OpporunityProduct that associates features with products). The disadvantage here is that the GUI for this kind of thing is not as good for this as it is for simple intersection objects.
Gonzalo Ruiz has in this section on MSDN, He pretty much says the same thing.
source share