Tuesday, 13 September 2016

For perfect Filtration:

For perfect Filtration:

        Declaration:
        boolean ok = true;
        boolean                InsertFlag = True;
        ;
    
 At the end of the DP class:
  InsertFlag = true;



        if(FromDate != dateNull())
        {
        if(FromDate >= VendPackingSlipJour.DeliveryDate)
            insertFlag = false;
        }
        if(ToDate != dateNull())
       {
        if(ToDate <= VendPackingSlipJour.DeliveryDate)
            insertFlag = false;
        }

        if(GRNNumber != "")
        {
            if(GRNNumber !=VendPackingSlipJour.packingslipid)
            insertFlag = false;
        }


             if(InsertFlag == true)
        materialReceipt.insert();


    }
Process Report :
    SysEntryPointAttribute(false)
]
public void processReport()
{
    Query                       query;
    QueryRun                    queryRun;
    PurchTable                  purchTable;
    CreatedDateTime             _GRNDate,_DeliveryDate;
    VendGroup                    VendGroup;
    VendTable                    VendTable;
    VendPackingSlipJour          VendPackingSlipJour;




    query    = this.parmQuery();
    queryRun = new QueryRun(this.parmQuery());
    this.getReportParameters();

   if(PONo)
   query.dataSourceTable(tablenum(purchTable)).addRange(fieldnum(purchTable, PurchId)).value(PONo);
   if(_ProjID)
   query.dataSourceTable(tablenum(purchTable)).addRange(fieldnum(purchTable, ProjId)).value(_ProjID);

    QueryRun  = new QueryRun(query);
    this.getReportParameters();
    while (queryRun.next())
        {

                PurchTable = queryRun.get(tableNum(PurchTable));
                this.insertITLTLMaterialReceiptRegisterTmp(PurchTable);
        }
}


No comments:

Post a Comment

POSTMAN D365

  Postman is useful to test the behavior of different OData class from/to D365FO. In this post we will see the steps to setup Postman with D...