I have set up Purchase order approval and workflow on NAV17.
Is there a way to prevent purchase orders being printed if the order is not approved, if not what is the point of approvals!
*This post is locked for comments
I have set up Purchase order approval and workflow on NAV17.
Is there a way to prevent purchase orders being printed if the order is not approved, if not what is the point of approvals!
*This post is locked for comments
There is no standard functionality in NAV.
As you said, the answer is possible but, You need to customize this. The solution suggested by Rob Fontaine is suites your need. Please mark the solution after you are done or post here, if your requirement is different.
You need to modify the code on print action button for preventing the printing of report unless it is approved.
Hi,
In the C/AL code of action 'Print' and 'Post+Print' present in purchase order page , you have to add the following as the status or the PO chanhes to Released once it has been approved:
OnAction()
IF PurchaseHeader.Status=PurchaseHeader.Status::Released THEN
BEGIN
//Original code already present in the action
END
ELSE
ERROR('Purchase order has not been approved!');
Hi Alan,
One option to try, which we've implemented, is to add the following code in the OnAction() trigger of the 'Print' and 'Post+Print' page actions on the Purchase Order page.
TESTFIELD(Status, Status::Released)
This would prevent the action from being allowed unless the status of the PO is 'Released', which is normally only set once the PO has been approved or if a user has access to the 'Release' action and clicks on it. In our case we've removed the 'Release' button from the custom Role Centres so the users do not see it.
Regards,
Rob
I don't think u can prevent printing, the main concept for approvals in your case to prevent "posting only" under a specific condition so no account will get hit until being approved.
André Arnaud de Cal... 291,711 Super User 2024 Season 2
Martin Dráb 230,458 Most Valuable Professional
nmaenpaa 101,156