Friday, May 16, 2014

Get Count of Lines from Header table record

// To Get Count of Line from Header  table

    real a,b;
    int64 cnt;

    a = RfqDisc.realValue();
    select count(RecId) from  PurchRFQCaseLine where PurchRFQCaseLine.RFQCaseId == PurchRFQCaseTable.RFQCaseId;
    cnt = PurchRFQCaseLine.RecId;
    b = a/cnt;
    while select PurchRFQCaseLine
                where PurchRFQCaseLine.RFQCaseId == PurchRFQCaseTable.RFQCaseId
    {
            PurchRFQCaseLine.LineDisc = b;
            PurchRFQCaseLine.update();

    }

    PurchRFQCaseLine_ds.reread();
    PurchRFQCaseLine_ds.research();
    PurchRFQCaseLine_ds.refresh();


No comments:

Post a Comment

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...