Partager via


Plug-Ins For Calculated Fields

Boom, Shake The Room…

It has been all go here in the UK CRM Enterprise Sales team, so I haven’t had any time to post regularly. Today, one of my Banking solutions partners called me for some help with one of their deals. They have an important client demo to deliver later this week, and are running out of time to build all the Dynamics CRM 2011 components they need.

They asked if I could help by building a plug-in that would execute whenever an Opportunity was updated and calculate a new Weighted Est. Revenue field by multiplying the standard Est. Revenue and Probability fields. Always one for a challenge, I set myself the goal of building, testing and creating a solution package within a couple of hours, which I managed with time to spare.

image

If you want to try this out, I have packaged up my solution as an unmanaged solution package, and made it available for download (along with the source code for the plug-in) here. The solution package contains the following:

  • A modified Opportunity entity containing a new "Weighted Est. Revenue" currency field.
  • A new Opportunity form, containing this new field - I have not updated any of the out-of-the-box forms, so this won’t overwrite any customisations you have made to the Opportunity entity.
  • A plug-in to handle the Create and Update events on the Opportunity entity.

Don’t forget, you need to extract the solution package .zip from the download .zip file before you can import it into CRM 2011 or CRM Online.

This posting is provided "AS IS" with no warranties, and confers no rights.

Laughing Boy Chestnuts Pre-School Chain Gang

WeightedEstimatedRevenue.zip

Comments

  • Anonymous
    December 22, 2011
    This is extremely useful, thanks for posting this.

  • Anonymous
    February 05, 2012
    You can use North52's Formula Manager to solve this type of problem without any coding... http://youtu.be/B9IGVSOSE9E

  • Anonymous
    May 23, 2013
    Hi Simon,     Did this approach worked for you without any problem, Because I have similar requirement.