Skip to Content
avatar image
Former Member

Access Close date field of opportunity via PDI

Dear Experts,

My team is currently working on a requirement in which we need to access the close date of an opportunity and accessing the year of the date.

OppParams.Add(OppQuery.,"I", "EQ","");

We are not able to find the path to access these fields so that we can add selection parameters.

Warm Regards,

Pragati

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    May 18, 2017 at 05:34 PM

    Hi Pragati,

    Did u try using this code..

    OppParams.Add( OppQuery.SalesForecastExpectedProcessingDatePeriod.EndDate,"I","GE",Context.GetCurrentSystemDate().StartOfYear() ); OppParams.Add( OppQuery.SalesForecastExpectedProcessingDatePeriod.EndDate,"I","LE",Context.GetCurrentSystemDate().EndOfYear() );

    Thanks,

    Deepak

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      ok Thanks a lot! But why the screen is getting blocked when I click on save tab? It should show the result in the field. But instead it keeps loading. Why this is happening and how can I resolve this?

      Regards,

      Pragati

  • May 12, 2017 at 01:57 PM

    Hi,

    Can you please following code to fetch based on EndDate?

    param.Add( query.SalesForecastExpectedProcessingDatePeriod.EndDate,"I","EQ",Context.GetCurrentSystemDate() );

    Thanks

    Saurabh

    Add comment
    10|10000 characters needed characters exceeded

  • May 25, 2017 at 01:00 PM

    Once I faced the similar issue in which my screen keeps loading endlessly and it was due to a dynamic dropdown whose property was set to static rather than dynamic. Have you customized this screen/ added some field or any type of changes ?

    Thanks

    Jayant

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 26, 2017 at 08:09 AM

    Hi Jayant,

    I have done code list mapping. Created a drop down field using KUT and tried to control ABC classification using code list restrictions. This is what I did only recently as far as dynamic dropdown is concerned. Can you advice how can I resolve this endless loading of screen?

    Regards,

    Pragati

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Jayant Saini

      Hi Jayant,

      I am getting a value in my extension field now and system is not getting locked. (below screenshot). But the value is wrong as it should be 6000 (the expected value of opportunity(s) associated to this customer only which close date year is 2017 ).

      Below Code:-

      If I do like this then it shows wrong value in the field

      var OppQuery=Opportunity.QueryByElements; var OppParams = OppQuery.CreateSelectionParams(); OppParams.Add(OppQuery.Status.LifeCycleStatusCode,"I", "EQ","2"); OppParams.Add(OppQuery.SalesForecastExpectedProcessingDatePeriod.EndDate,"I","GE",Context.GetCurrentSystemDate().StartOfYear()); OppParams.Add(OppQuery.SalesForecastExpectedProcessingDatePeriod.EndDate,"I","LE",Context.GetCurrent

      And if I do like this:-

      1) Created AccountID extension field:

      element AccountID:BusinessPartnerInternalID;

      2) Then in ABSL event

      var OppQuery=Opportunity.QueryByElements; var OppParams = OppQuery.CreateSelectionParams(); OppParams.Add(OppQuery.Status.LifeCycleStatusCode,"I", "EQ","2"); OppParams.Add(OppQuery.SalesForecastExpectedProcessingDatePeriod.EndDate,"I","GE",Context.GetCurrentSystemDate().StartOfYear()); OppParams.Add(OppQuery.SalesForecastExpectedProcessingDatePeriod.EndDate,"I","LE",Context.GetCurrent

      OppParams.Add(OppQuery.PartyPartyKey.PartyID.content,"I","EQ",this.CurrentCommon.GetFirst().AccountID);


      Please help why it is still not talking any value as I have now added one more parameter to refine the data so that it fetches opportunities with their associated accounts.

      Regards,

      Pragati

      accountid.png (79.8 kB)