Scenario: Looking to restrict the valid expense accounts during PO entry to specific accounts.
- Add a custom validation in UD User Validation
- In the SQL tab, insert the code found here. Customize code to use your list of acceptable accounts.
- Press the compile button.
- In PO Purchase Order Entry, Press F3 on the GL Account field.
- In the System Overrides tab, set Validation level to 2-Show error, disallow save or your choice.
- In the Procedure field find the custom validation you created.
- In the parameters field, input 115, 155 to pass the linetype and GL Account to the validation.
- Test the validation in a test environment to make sure if functions as expected.