Friday, September 10, 2010

CRM 4.0 How to capture a Many to Many Event

After spending many hours trying to capture the on create of a many to many relationship, I found only 2 ways to do so:

1. Add a bit field that is set to true on load. This then requires the user to save the form. Create a workflow for when the bit field has changed. Then add to the workflow a condition when bit field is true followed by your process. End with the bit field being set to false.

  • Advantage: Requires minimal code and is supported by Microsoft.

  • Disdvantage: Upon every save (update) a workflow will fire. Not very optimal.



2. Create a trigger. The linker table exists inside the MSCRM database. On that table create a trigger that will perform your task when a new item is added.

  • Advantage: Only fires when new items are added.

  • Disdvantage: Not supported by Microsoft and the trigger will be removed upon Upgrade.

No comments:

Post a Comment