locked
Sum all Campaign Responses field RRS feed

  • Question

  • Hi all,

    I have a field on each campaign response that is a 'Total Cost'.  What I want to do is sum this field for every campaign response within each campaign so that within each campaign there is a total of all the campaign responses.  Is this possible and how would I go about this?

    Thanks.

    Monday, October 1, 2012 8:50 AM

Answers

  • Hi,

    this sounds like the perfect use case for a plugin. You can create a plugin that hooks on the create/update etc. events, calculates the sum of all related Campaign Responses, and saves the result in a custom field in the parent Campaign entity.

    For a complete walkthrough on creating plugins look here.

    Greetings,

    Pavlos

    • Proposed as answer by Pavlos Panagiotidis Wednesday, November 7, 2012 9:08 AM
    • Marked as answer by RoarCRM Wednesday, November 7, 2012 9:21 AM
    Tuesday, October 2, 2012 11:01 AM

All replies

  • Hi,

    this sounds like the perfect use case for a plugin. You can create a plugin that hooks on the create/update etc. events, calculates the sum of all related Campaign Responses, and saves the result in a custom field in the parent Campaign entity.

    For a complete walkthrough on creating plugins look here.

    Greetings,

    Pavlos

    • Proposed as answer by Pavlos Panagiotidis Wednesday, November 7, 2012 9:08 AM
    • Marked as answer by RoarCRM Wednesday, November 7, 2012 9:21 AM
    Tuesday, October 2, 2012 11:01 AM
  • Thanks for that.

    Was hoping there was an easier way than that though!

    Tuesday, October 2, 2012 3:27 PM