Skip to content

Instantly share code, notes, and snippets.

@BrianMRO
Created April 25, 2023 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrianMRO/e20bc87512fed3ad10cc9ea6f0c3ada9 to your computer and use it in GitHub Desktop.
Save BrianMRO/e20bc87512fed3ad10cc9ea6f0c3ada9 to your computer and use it in GitHub Desktop.
Dynamically Active Grid Action - The Action
#region View Sales Order Button - Used for Linking SO # on Grid to Sales Order Page
public PXAction<MyDAC> ViewLineSO;
[PXUIField(DisplayName = "View Line SO", MapViewRights = PXCacheRights.Select, MapEnableRights = PXCacheRights.Update)]
[PXButton(ImageKey = PX.Web.UI.Sprite.Main.DataEntryF, DisplayOnMainToolbar = false, CommitChanges = true)]
protected virtual void viewLineSO()
{
MyLine row = Lines.Current;
SOOrderEntry graph = PXGraph.CreateInstance<SOOrderEntry>();
graph.Document.Current = graph.Document.Search<SOOrder.orderType, SOOrder.orderNbr>(row.SOOrderType, row.SOOrderNbr);
if (graph.Document.Current != null)
{
throw new PXRedirectRequiredException(graph, true, "Sales Order");
}
}
#endregion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment