Thursday, June 5, 2014

Based on the input given Number sequence will generate

//Based on the input given Number sequence will generate

static void TimeSheetNumFromQty(Args _args)
{
    TSTimesheetNbr      num;
    CustTable           custTable;
    NumTmp              tmp;
    int                 i = 1;
    NumberSeq           numberSeq;
    Dialog              dialog;
    DialogGroup         dialogGroup;
    DialogField         dialogFieldQty;
    ;
    dialog          = new   Dialog("Quantity Input");
    dialogGroup     = dialog.addGroup(" qty");
    dialogFieldQty  = dialog.addField(ExtendedTypestr(Name),"Qty :");
    numberSeq       = NumberSeq::newGetNum(ProjParameters::numRefTimesheetNbr());

    if(dialog.run())
    {
        while(i <= any2int(dialogFieldQty.value()))
        {
            num             = numberSeq.num();
            tmp.AccountNum  = "1001";
            tmp.SerialNum   = num;
            tmp.CustName    = "CBS";
            //info(num);
            //info(strFmt("%1",dialogFieldQty.value()));
            info(strFmt("%1    - %2   - %3   - %4",i,tmp.AccountNum,tmp.SerialNum,tmp.CustName));
            i++;
        }
     }
}

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