Error before posting

Hi all!!!

I have added a preview posting functionality in purchase invoice in Nav 13.

I want to add an error to the system that if the user does not view the preview posting report, the system should give an error on posting.

without viewing the report it should not allow the user to post the purchase invoice.

And… what is the question? How to implement this error?

You need a BOOLEAN field in purchase header: Previewed. When the preview has been done, change the value to TRUE. When user tries to post, if this field is FALSE, give an error.

can you please elaborate it more, how to get it done?

as im a new to navision

As I’ve understood, you have created a new report for preview posting.

  • Create a new field in “Purchase header” named “Previewed” as boolean data type
  • Change your new report, and for each purchase header processed, change “Previewed” to TRUE (and save)
  • Change codeunit 90, and test “Previewed” field, if it is FALSE and field “Invoice” is TRUE, give an error