Monday, February 1, 2010

Firing plugin on change in many-to-many relationship

Well, I tried to fire my plugin on adding/removing a product to a competitor. Microsoft documentation describes SetRelated/RemoveRelated messages - but apparently these messages only get fired from the code, not from GUI. GUI fires AssociateEntities/DisassociateEntities messages. Which are not supported by plugins...

Then I found this nice script that allows the plugins to use AssociateEntities/DisassociateEntities messages.

http://crmpro.blogspot.com/2009/10/registering-plugins-for-event-on-many.html

No comments: