Is there a way I can stop a role from creating vendor bills for a certain type of vendor? For example, I want to be able to stop the role from being able to create a vendor bill if vendor category is XYZ. I know a workflow to remove the Bill button from the Purchase Order will work, but this will not stop the PO from appearing on the "Pay Bills" functionality.
m
MGBC
08/01/2023, 3:24 PM
You can use a Return User Error workflow action. Use the condition of User Role = X and Vendor Category = XYZ.
Then put it as a Before Record Submit trigger
MGBC
08/01/2023, 3:25 PM
This will return a system error (Like the An unexpected error has occured) and NOT save the record
MGBC
08/01/2023, 3:25 PM
It's not ideal because the user thinks they are able to process everythingn but only receive the error when they Save and all work is lost, but at least it stops them from doing it
MGBC
08/01/2023, 3:25 PM
Or change the Permissions on the role to View Only?
m
Mika Hakkinen
08/01/2023, 4:02 PM
Changing the permission wont work because we need the role to create vendor bills for all other vendor categories, with the exception of category XYZ as mentioned above.
Mika Hakkinen
08/01/2023, 4:02 PM
Thanks @MGBC
p
PWN
08/02/2023, 8:29 AM
if you have an approval workflow going you could also add a condition there to just auto-reject them with a note e.g.