Hello Experts,
I am new to Business Central.
I just need a small help in terms of coding.
Example:
Normally when I do a purchase order, the system automatically assign the defined serial number which has been defined in Number series Table that is P-ORD (P-ORD-001 to P-ORD-099) and also which have been selected in the Purchases & Payables Setup, that is P-ORD. That's fine.
Now, I have added a relationship when I am doing a purchase order. I can also do a purchase order interms of foreign. In the number series table it is like this: PO-ORD-F (P-ORD-F-001 to P-ORD-F-099). I have also extended the purchases and payables setup to cater for this.
Now the problem is that whenever I do a purchase order in foreign and post it, the posted invoice number takes into account the number which has been defined in the purchases & payables setup, that is like P-INV+.which is for normal purchase order.
Kindly note that I have also added the field for Posted Invoice Foreign that is PIF+ in the purchases & payables setup ,like we have for normal posted purchase invoice.
My main issue is that which code can i put and where should I put it when , whenever i do a purchase order in foreign and when I post it, it takes the number defined in purchases & payables setup under Posted Invoice Foreign. Like it picks that Posted Invoice Foreign serial number whenever the purchase order is in foreign.
Because right now when i am doing a purchase order in foreign, and when i post it, it is taking the standard posted purchase invoice number series that is P-INV+ not the one which I have customized, that is PIF+
Thanks to help me with this code.