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

Convert Call stack to readable format in D365FO X++

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