0

Can we create Purchase order Number Sequence with the division capture for Local and Foreign purchases?

Can we create two number sequence at a time in AX 2012 ?

AnthonyBlake
  • 2,334
  • 1
  • 25
  • 39

1 Answers1

1

Yes you can.

Not knowing anything about your version or what you have done or tried, I will try guessing you are using AX 2012.

Then go looking in \Classes\CustPostInvoice\run on how they set the invoiceId variable.

    if (countryRegion_LTLV)
    {
        [invoiceId, voucher] = this.getNumAndVoucher_W(numberSeq);
    }
    else
    {
        [invoiceId, voucher] = numberSeq.numAndVoucher();
    }

It even looks more ugly, but the point is, use two different number sequences, then use an if to choose the right one.

Maybe you should also read about setting up a new number sequence?

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
  • ya Jan B.kjeldsen we are using ax 2012 version. – user3172646 Jan 10 '14 at 05:54
  • Actually I have a requirement for Purchase order Number Sequencing... The Requirement is : we have to create separate number sequence for local purchase order and foreign purchase order. I've created a separate field in Purchase table i.e., type of purchase order and used that in classes\..\numberSeqFormHandlerPurchId .. Can you tel me whether it will work out or not..??? – user3172646 Jan 10 '14 at 07:42
  • Have you tried it? I guess it will not work, unless the field is set before assigning the number! Try to put the field in the form PurchTableCreate. You may have to move the numberseq calls form create to the write methods. – Jan B. Kjeldsen Jan 10 '14 at 08:21