Overnight batch of invoices , orders

Hi Guys,

We have a new client req. to sync a system with our NAV installation completly automated without user intervention.

This would mean to sync Item table and post Sales Invoices and G/L Entries.

Question , what method can I do for posting and error handling. Given that the posting routines are full of interactive errror mesages . Can I turn them off and log them ?

My assumption is to build a report or a codeunit that is going to be scheduled with JobQueue and run the necessary dataports and codeunits for posting and synching, overnight!

Any good ideas on this ?



Not sure how complex you want this but, you can call the Sales-Post codeunit with a condition statement like the following;

IF SalesPost.RUN(SalesHeader) THEN

PostedSalesHeaderCounter += 1


FailedPostedSalesHeaderCounter += 1;

This will suppress ERROR messages in the codeunit. However, MESSAGE and DIALOG messages will still be displayed so you may have to add a function to bypass these messages/dialogs or just simply remove the code.

If you call from NAS then the error messages will be suppressed.

Hi David ,

If we do that ,then I cant log them, can I ?