Skip to Content
avatar image
Former Member

MDR for update IdleDays from custom BO to standard BO Opportunity

Hi Experts,

I have Created MDR for Opportunity .

Requirement is to update “IdleDays “ every day .

Please find the following information

CustomOppLead.xbo

import AP.Common.GDT as apCommonGDT;

businessobject CustomOppLead {

[AlternativeKey]element Id:ID;

element ZOppID:BusinessTransactionDocumentID;

element IdleDays1 :LANGUAGEINDEPENDENT_EXTENDED_Text;

action UpdateIdleDays;

}

UpdateIdleDays.ABSL

import ABSL;

import AP.CRM.Global;

var indicator = true;

var isTrue = false;

var OpptQry = Opportunity.QueryByElements;

if(indicator)

isTrue = true;

//var OpptSel = OpptQry.CreateSelectionParams();

//OpptSel.Add(OpptQry.,"I","EQ",this.SubmittedBy.content);

//OpptSel.Add(OpptQry.Status.LifeCycleStatusCode,"I","EQ","4");

var OpptRes = OpptQry.Execute();

var OpprtCount = OpptRes.Count();

if (OpprtCount >= 1){

var OpenOppt_sorted = OpptRes.OrderByDescending(n=>n.ID.content);

foreach( var oppt_tab in OpenOppt_sorted){

var CurrentDateTime = Context.GetCurrentGlobalDateTime();

var changedOnDateTime = oppt_tab.SystemAdministrativeData.LastChangeDateTime;

var CurrentDate = CurrentDateTime.ConvertToDate();

var changedOnDate = changedOnDateTime.ConvertToDate();

var DateDifference = changedOnDate.Delta(CurrentDate).ConvertToDays();

this.IdleDays1 = DateDifference.ToString();

//oppt_tab.ZIdleDays.content = DateDifferenc;

//oppt_tab.ZIdleDays.unitCode = "DAY";

}

}

My Query is how to update IdleDays from custom BO to standard BO Opportunity

Thanks & Regards,

SRINIVAS BORRA

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers