Defining Invalid Actions
To define invalid actions, use the Invalid Actions (RC_INVALID_ACTIONS) component.
This section provides an overview of the PeopleCode for an invalid action and discusses how to define a message catalog entry for an invalid action error message.
Page Name |
Definition Name |
Usage |
---|---|---|
RC_INVALID_ACTIONS |
Establish names, descriptions, and associated messages for invalid actions. |
To enforce invalid action processing, a PeopleCode program calls the BusProjectInvalidAction PeopleCode function and passes it the business project instance and the name of the attempted action. The BusProjectInvalidAction function uses the definition of the phase that is in progress and determines if the action is invalid for that phase.
If the action is invalid, the function returns a value of True and sets any variables in the message catalog entry associated with the invalid action. The application that called the function must then take the appropriate action.
BusProjectInvalidAction Function
Use the following syntax for the BusProjectInvalidAction function:
BusProjectInvalidAction(&BPInstance, &strAction, &Msg_Set_Nbr, &Msg_Nbr);
The following table explains the function's parameters:
Parameter |
Description |
---|---|
&BPInstance |
The instance of the business project that is associated with the current order, quote, or case. |
&strAction |
The invalid action name as established on the Invalid Action Definitions page. |
&Msg_Set_Nbr |
The message set number associated with the invalid action. Use a null value when calling the function; the function returns a value based on the invalid action definition. |
&Msg_Nbr |
The message number associated with the invalid action. Use a null value when calling the function; the function returns a value based on the invalid action definition. |
Strategies
To prevent users from changing a specific field, create a single invalid action definition and then use PeopleCode to pass the name of that invalid action to the BusProjectInvalidAction function every time that the field changes.
To disallow specific field values, create invalid action definitions for each disallowed value and then use PeopleCode to pass the field value to the BusProjectInvalidAction function every time that the field changes. As long as you use the exact field value as the invalid action name, one PeopleCode program suffices for all of the invalid actions.
For other invalid actions, use PeopleCode to determine when the action occurs and to pass the appropriate action name to the BusProjectInvalidAction function.
Definition of message catalog entries is discussed in the documentation for the message catalog.
See PeopleTools: PeopleSoft Application Designer Developer's Guide.
Use the Invalid Action Definitions page (RC_INVALID_ACTIONS) to establish names, descriptions, and associated messages for invalid actions.
Navigation:
This example illustrates the fields and controls on the Invalid Action Definitions page.

Field or Control |
Description |
---|---|
Invalid Action |
Enter the name of the action. If the invalid action is an invalid field value (for example, if users are not permitted to set the status to Canceled), use the field value as the action name. This simplifies the PeopleCode that verifies whether an action is invalid. |
Message Set, Message Number, and Message Text |
Enter the set number and message number for the error message that the system displays when a user attempts an invalid action. After you select a message, the corresponding text appears. |