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

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...