Step 1: Implementing the Action in the Graph
In this step, you will add the ReleaseFromHold action to the
RSSVWorkOrderEntry graph.
To define the action in the graph, do the following:
- Add the
using System.Collections;directive to theRSSVWorkOrderEntry.csfile (if it has not been added yet). Then, add theActionsregion. - In the
Actionsregion, add the following code.#region Actions public PXAction<RSSVWorkOrder> ReleaseFromHold = null!; [PXButton(), PXUIField(DisplayName = "Remove Hold", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)] protected virtual IEnumerable releaseFromHold(PXAdapter adapter) => adapter.Get(); #endregionIn the code above, you have added a field of the PXAction<> type and the method that implements the action. The method is empty because the business logic behind the action will be described in the code of the workflow.
The action method is decorated with the PXButton attribute, where you specify the display name of the action and the cache access rights.
- Save your changes.
