on 05-10-2017 6:07 PM
Hi Friends,
I have been trying to add up all the expected value of all opportunities having close date year is current year. And want to store the value of that sum to a field in customer header.
For this I have been writing this code:
Event- AfterModify
import ABSL;
import AP.FO.BusinessPartner.Global;
import AP.FO.BusinessPartnerRelationship.Global;
import AP.CRM.Global;
import AP.FO.Activity.Global;
var Amount=0;
var Currency ="";
if(this.IsSet())
{
var OppQuery=Opportunity.QueryByElements;
var OppParams = OppQuery.CreateSelectionParams();
OppParams.Add(OppQuery.Status.LifeCycleStatusCode,"I", "EQ","Won");
OppParams.Add(OppQuery.,"I", "EQ",""); // What should I mention here for closing date?
var OppRes= OppQuery.Execute(OppParams);
if(OppRes.Count()>0)
{ foreach(var OppIns in OppRes)
{
var Total= OppIns.
OppParams.Add(OppQuery.,"I", "EQ","");
Please help me with below queries:-
1) Trying to add parameter "Close date" & "start date" of opportunity but I'm not able to find the path to "close date" & "start date" fields in opportunity BO. How can I do this?
2) So that the result can be filtered when close date year is equal to the current year. How can I do this entire thing?
Please help..
Regards,
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.