I've created a button on the vendor page which should restrict who can release a purchase order. If the "Approved" button is pressed then the user should be able to release a purchase order, if not then it should error. In this code This should recognise of this button is pressed and either error or release.
This is my code to see if the vendor has been accepted.
The problem is when the vendor has been accepted and I attempt to release it it is still producing the error and not the code after it (in the first picture). How can I ensure it's correctly checking?
Thanks
*This post is locked for comments