Hi,
Iam facing one problem with purchase Orders posting. one of our client create the purchase orders and they want to post automatically. I created one Codeunit. i wrote the code below.
PurchHeader.INIT;
PurchLine.INIT;
IF PurchHeader.FIND('-') THEN
REPEAT
PurchHeader.Receive := TRUE;
PurchHeader.Invoice := TRUE;
PurchHeader.MODIFY;
PurchPost.RUN(PurchHeader);
UNTIL PurchHeader.NEXT = 0;
but iam facing one problem. suppose 10 PO's are created. In the 5th PO some Mandatory data was not given. if i run this codeunit 4 PO's will posted but after the 5th PO it was error. then it will not process the next 5 records. now i want if any records contain error it will skip that record and process the next record. it will not stop.
how can i do that????
Thanks & Regards,
kishore...
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thanks for ur reply. I gave the same code but iam facing the same problem. I gave items must have lot Numbers. I created 3 PO's. first PO i gave lot number, 2nd PO i didnt gave lot and 3rd PO i gave Lot.
i run this codeunit it will stop in the 2nd record. 3rd record was not posted.
Lot number or Externall doc number details are mentioned in Codeunit-90.
how can i do that??
Thanks & regards,
kishore...