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.cs
file (if it has not been added yet). Then, add theActions
region. - In the
Actions
region, 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(); #endregion
In 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.