Hello
I'm wondering if one of you geniuses out there might be able to share some code examples of using a utility class to share common code across multiple plugins to implement the same behaviour across a range of different messages on different CRM entities.
I'm trying to calculate a balance figure which is stored on a parent record and should be calculated based on the invoices, payments and credits that are associated to the parent record ("account"). Any time a new invoice, payment or credit is applied to the account I'd like the balance figure to be re-calculated based on common logic; I can make it work by copying / pasting the same code into every plugin however this can't be the most efficient way.
There's a plugin.cs class which looks like the most likely candidate for storing the methods I need however how would I then reference that froma plugin on invoice for example?
I'm using the CRM developer toolkit and it's CRM online so any ideas would have to work in sandbox.
Thanks!
Iain
Iain Wright