Run Validation

You might have the need to perform some last minute validation before a user triggers a run control. Essentially, at the point at which they press the "Run" button to schedule the process. For example, you might want to check you have all the relevant parameters, or perform more complex validation based on two or more parameters.

My suggestion for doing this is to put it into component PeopleCode for the relevant run control component in either FieldEdit or FieldChange event of the Run button.

Specifically, the location for this code would be component-record-field PeopleCode at:


This is assuming that you have added the PRCSRUNCNTL_SBP to your run control page. The PeopleCode location will vary if you are using a different run control subpage.

The nice thing about using component-record-field PeopleCode here is that the validation is just for your component (and does not get called in other components that use the same shared sub-page).

Remember to use the PeopleCode Error command if you need to stop processing and prevent the run control being scheduled if you are using FieldChange. Alternatively use the FieldEdit event.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License