How to create a count of records matching certain requirements, and use that count as a value in a field.

Odpovědět How to create a count of records matching certain requirements, and use that count as a value in a field.

  • Friday, January 04, 2013 7:35 PM
     
     

    Hello,

    What I want is fairly basic but definitely not the easiest to figure out. I have a form and Im putting a custom field on that form called "Lost This Year." I want the value of that field to be, simply, the amount of opportunities that have been lost this year. So, somehow I need the CRM to count the amount of records that have been lost this year and enter the total in that custom field. Ive considered and tried many things. Right now Im thinking about using subgrids and somehow pulling the total record count from the grids but there has to be an easier way. Any help is appreciated.

    John

All Replies

  • Friday, January 04, 2013 8:53 PM
     
     Answered

    Hi,

      assuming that's an account form, you might create an opportunity-based workflow which would do this:

    1. Start whenever your opportunity status is updated
    2. Have a condition step to verify that it's a "lost" opportunity
    3. If it is, the there would be another step to update opportunity account
    4. In that update step, increment the counter (use "increment by" to set the attribute):

    


    Alex Shlega, GotchaHunter.Net