Created
April 25, 2023 20:34
-
-
Save BrianMRO/e20bc87512fed3ad10cc9ea6f0c3ada9 to your computer and use it in GitHub Desktop.
Dynamically Active Grid Action - The Action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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