Sunday, 22 March 2020

Update_recordset Taking long time / Not responding

skip databaselog,datamethods,events before Update_Recordset.
Ex: wmsOrderTrans.skipDatabaseLog(true);
    wmsOrderTrans.skipDataMethods(true);
    wmsOrderTrans.skipEvents(true); 
Example Code:
static void Job250(Args _args)
{
    WMSOrderTrans           wmsOrderTrans;
    InventDim               inventDimCur;
    InventDim               inventDimPackSlip;
    InventTrans             inventTransPackSlip;
    ;
    wmsOrderTrans.skipDatabaseLog(true);
    wmsOrderTrans.skipDataMethods(true);
    wmsOrderTrans.skipEvents(true);
    update_recordset wmsOrderTrans setting BBBPackingSlipExists  = NoYes::Yes
        where wmsOrderTrans.isReserved
        exists join inventTransPackSlip
        where inventTransPackSlip.InventTransId == wmsOrderTrans.inventTransId
          && (inventTransPackSlip.StatusIssue == StatusIssue::Deducted
           || inventTransPackSlip.StatusIssue == StatusIssue::Sold)
          && !inventTransPackSlip.PackingSlipReturned
        exists join inventDimCur
        where inventDimCur.inventDimId == wmsOrderTrans.inventDimId
        exists join inventDimPackSlip
        where inventDimPackSlip.inventDimId == inventTransPackSlip.inventDimId
           && inventDimCur.inventSerialId  == inventDimPackSlip.inventSerialId;       
}

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...