Question Status

Suggested Answer
Athira asked a question on 12 Mar 2015 5:26 AM

Hi,

How to get the total actual amount of  won opportunities for each account with in a  specific period ?

Account is related to the potential customer in opportunity. I tried by creating workflows. But didn't work. Can anyone help me.... 

Reply
Suggested Answer
Mahendar Pal MVP responded on 12 Mar 2015 5:48 AM

Hi,

You could build a report a report using Report wizard and select primary entity as account and related entity as opportunity, after that you can define grouping based on account.

Once you will run your report you can edit filter criteria to define period and status as won.

Do you have any other specific requirement to show the total ??


Need help in CRM Contact US | Our Blog | Follow US | Like our Facebook Page | Our Book

Make sure to Vote as Helpful and  Mark As Answer ,if you get answer of your question.

Reply
Athira responded on 12 Mar 2015 5:57 AM

yes, I want to show the value in Account form .

Reply
Mahendar Pal MVP responded on 12 Mar 2015 6:08 AM

You can create currency fields in account where you want to store this value. You can write a win message plugin on opportunity, validate your duration criteria and can update associated account record with total amount.


Need help in CRM Contact US | Our Blog | Follow US | Like our Facebook Page | Our Book

Make sure to Vote as Helpful and  Mark As Answer ,if you get answer of your question.

Reply
Athira responded on 12 Mar 2015 6:19 AM

Thank you for your reply.

I haven't worked with plugin . So it will be more helpful when you provide more information about this.

Reply
Mahendar Pal MVP responded on 12 Mar 2015 6:28 AM

Could you provide some more details on the requirement for example how/from where you want to set specific duration for the calculating amount ?? also which CRM version you are using ??


Need help in CRM Contact US | Our Blog | Follow US | Like our Facebook Page | Our Book

Make sure to Vote as Helpful and  Mark As Answer ,if you get answer of your question.

Reply
Athira responded on 12 Mar 2015 6:32 AM

CRM 2013 version.

I need to set the value of annual revenue filed in Account form as the total from opportunities that are closed as won for the account.

Reply
Mahendar Pal MVP responded on 12 Mar 2015 6:37 AM

How you want to validate duration ?? as you mentioned in initial query


Need help in CRM Contact US | Our Blog | Follow US | Like our Facebook Page | Our Book

Make sure to Vote as Helpful and  Mark As Answer ,if you get answer of your question.

Reply
Athira responded on 12 Mar 2015 6:39 AM

Duration is calculated by getting the difference between Current Date and Account Creation Date.

Reply
Suggested Answer
Mahendar Pal MVP responded on 12 Mar 2015 7:34 AM

Please download MS CRM SDK if you have not done it yet, it has sample code for plugins.

You can also check for online SDK reference: msdn.microsoft.com/.../gg328490.aspx

Write your plugin in Win message and write your calculation in your plugin.

Check this post, how to get opportunity entity in Win plugin, you need to check associated account: simplicitypoint.wordpress.com/.../getting-the-opportunity-entity-in-plugin-when-closing-as-won


Need help in CRM Contact US | Our Blog | Follow US | Like our Facebook Page | Our Book

Make sure to Vote as Helpful and  Mark As Answer ,if you get answer of your question.

Reply
Suggested Answer
Mithilesh Kumar responded on 12 Mar 2015 7:45 AM

Hi Athira,

Since you are using CRM 2013, I would suggest you to make use of On Demand Workflow / Scheduled Workflow (without Wait Condition) along with Custom Workflow Activity.

You will have to make use of FetchXML to Query your Database to bring in all the Won Opportunities and then Calculate the Total Actual Revenue in a given time.

You can download the FetchXML from Advanced Find as below

In CRM 2015 you have a new Field Type called Roll Up Fields which can be used without any code. You can refer this if you want.

http://blog.sonomapartners.com/2014/09/dynamics-crm-2015-calculated-and-rollup-fields.html

Hope that helps

Thanks

Reply
Suggested Answer
Mahendar Pal MVP responded on 12 Mar 2015 5:48 AM

Hi,

You could build a report a report using Report wizard and select primary entity as account and related entity as opportunity, after that you can define grouping based on account.

Once you will run your report you can edit filter criteria to define period and status as won.

Do you have any other specific requirement to show the total ??


Need help in CRM Contact US | Our Blog | Follow US | Like our Facebook Page | Our Book

Make sure to Vote as Helpful and  Mark As Answer ,if you get answer of your question.

Reply
Suggested Answer
Mahendar Pal MVP responded on 12 Mar 2015 7:34 AM

Please download MS CRM SDK if you have not done it yet, it has sample code for plugins.

You can also check for online SDK reference: msdn.microsoft.com/.../gg328490.aspx

Write your plugin in Win message and write your calculation in your plugin.

Check this post, how to get opportunity entity in Win plugin, you need to check associated account: simplicitypoint.wordpress.com/.../getting-the-opportunity-entity-in-plugin-when-closing-as-won


Need help in CRM Contact US | Our Blog | Follow US | Like our Facebook Page | Our Book

Make sure to Vote as Helpful and  Mark As Answer ,if you get answer of your question.

Reply
Suggested Answer
Mithilesh Kumar responded on 12 Mar 2015 7:45 AM

Hi Athira,

Since you are using CRM 2013, I would suggest you to make use of On Demand Workflow / Scheduled Workflow (without Wait Condition) along with Custom Workflow Activity.

You will have to make use of FetchXML to Query your Database to bring in all the Won Opportunities and then Calculate the Total Actual Revenue in a given time.

You can download the FetchXML from Advanced Find as below

In CRM 2015 you have a new Field Type called Roll Up Fields which can be used without any code. You can refer this if you want.

http://blog.sonomapartners.com/2014/09/dynamics-crm-2015-calculated-and-rollup-fields.html

Hope that helps

Thanks

Reply