on 01-19-2018 4:42 PM
Hello
we would like to get the possibility to automatically close the opportunity if the close date has passed (overdue). I tried to use the workflow rules, but in "Define Actions" :
- if i use the rule type "Field Update", I don't find the opportunity status field
- if i use the rule type "Action", i don't find the "close opportunity" action
Do you know if it's achievable. Can you please help ?
Thank you
Jérémie Waltman
Hi,
Instead of using Workflow rules to do so please evaluate if you can make use of MDR(Mass Data Run) functionality where using ABSL code you can use first filter all the opportunities and then use action "STOP" to close the opportunities.
import ABSL;import AP.CRM.Global;
var CurrrentDate = Context.GetCurrentSystemDate();
var query = Opportunity.QueryByElements;
var p = query.CreateSelectionParams();
p.Add( query.SalesForecastExpectedProcessingDatePeriod.EndDate,"I","LT",CurrrentDate);
p.Add( query.Status.LifeCycleStatusCode,"I","EQ","1");
p.Add( query.Status.LifeCycleStatusCode,"I","EQ","2");
var res = query.ExecuteFromDB(p);
foreach( var Opp in res)
{
Opp.Name.content = "Stalled Opportunity. Automatically Closed";
Opp.Stop();
}
You can schedule the MDR Monthly or Weekly based on your amount of client data.
https://blogs.sap.com/2016/05/17/how-to-schedule-a-batch-job-using-mdr-in-c4c/
Thanks
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
there is an option called custom status in WF and also you can schedule the conversion based on standard dates available in teh WF
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.