Tuesday, November 11, 2025

Event handler

 class PMECustomerAgingReportDP 

{ 

    /// <summary> 

    /// 

    /// </summary> 

    /// <param name="args"></param> 

    [PostHandlerFor(classStr(PMECustAgingReportDp), methodStr(PMECustAgingReportDpprocessReport))] 

    public static void PMECustAgingReportDp_Post_processReport(XppPrePostArgs args) 

    { 

           

        PMECustAgingReportDp                  dpInstance = args.getThis() as PMECustAgingReportDp; 

        CustAgingReportTmp                    tmpTable   = dpInstance.getCustAgingReportTmp(); 

        //DefaultDimensionView    DefaultDimensionView; 

       

  

  

        ttsbegin; 

       

        while select forupdate tmpTable 

        { 

            CustTrans               custTrans; 

  

            select firstonly custTrans 

                where custTrans.Voucher == tmpTable.Voucher; 

  

            if (tmpTable.Voucher != "") 

            { 

                DimensionAttributeValueSetItemView dimensionAttributeValueSetItemView; 

                DimensionAttribute      location = DimensionAttribute::findByName("Location"); 

                select DisplayValue from dimensionAttributeValueSetItemView 

                    where dimensionAttributeValueSetItemView.DimensionAttributeValueSet == custTrans.DefaultDimension 

                        && dimensionAttributeValueSetItemView.DimensionAttribute    == location.RecId; 

  

                tmpTable.Location = dimensionAttributeValueSetItemView.DISPLAYVALUE; 

  

                tmpTable.update(); 

                     

  

            } 

        } 

        ttscommit; 

    } 

  

} 

No comments:

Post a Comment