I am using Navision Attain -310, I am trying to import sales order (about 100 orders) from a text file and post it with help of codeunit- sales-post (80). Now if any of the order in the middle have any Error, the posting stops and am not able to post the rest of orders from the file if they are correct . IS there any way to skip the Order with error and go to the next order without terminating the process. It is tedious jobs for my user if he have to start importing orders, every times an occurs while posting. Harikesh
Yes… you can batch posting (it’s standard). On posting functions you’re having three options: post, post & print and batch post… choose that last one… it will post the ones that are having no errors and show you at the end the number of correctly posted of the total (example 56 of 100). Regards,
Thanks Alfonso that is ok, but i am not creating all the document first. i am reading one documnet from the text file and posting it. Then i read the next document in the text file and post. Do u suggest me to create all the document first and then run the batch posting . harikesh
Yup… that sounds like the best idea to me. In fact is what i thought when reading your first post you were going to do. Regards,
Another option is that you add the code to your import process… that’s just a fewlines: But i think that importing first could be better as you can that way check that the orders are correct before posting… CLEAR(SalesPost); SalesPost.SetPostingDate(ReplacePostingDate,ReplaceDocumentDate,PostingDateReq); IF SalesPost.RUN(“Sales Header”) THEN BEGIN IF “Sales Header”.Ship AND SendShipNotif THEN IF WebSite.FIND(’-’) THEN BEGIN NotifMgt.SendOrderShipMail(“Sales Header”); COMMIT; END; END; Regards,