Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class MyGraph : PXGraph<MyGraph>
{
public MyGraph()
{
MainCommand.MenuAutoOpen = true;
MainCommand.AddMenuAction(SubCommand2);
MainCommand.AddMenuAction(SubCommand1);
}
public PXAction<UPCompany> MainCommand;
public PXAction<UPCompany> SubCommand1;
public PXAction<UPCompany> SubCommand2;
[PXButton(ImageKey = Sprite.Main.Process, Tooltip = "Sub Command 2 Tooltip")]
[PXUIField(DisplayName = "Sub Command 2", MapEnableRights = PXCacheRights.Delete, MapViewRights = PXCacheRights.Delete)]
protected IEnumerable subCommand1(PXAdapter adapter)
{
//Do sub command 2
return adapter.Get();
}
[PXButton(ImageKey = Sprite.Main.Process, Tooltip = "Sub Command 2 Tooltip")]
[PXUIField(DisplayName = "Sub Command 2", MapEnableRights = PXCacheRights.Delete, MapViewRights = PXCacheRights.Delete)]
protected IEnumerable subCommand2(PXAdapter adapter)
{
//Do sub command 2
return adapter.Get();
}
[PXButton(ImageKey = Sprite.Main.Process, Tooltip = "Main Command Tooltip")]
[PXUIField(DisplayName = "Main Command", MapEnableRights = PXCacheRights.Delete, MapViewRights = PXCacheRights.Delete)]
protected IEnumerable mainCommand(PXAdapter adapter)
{
return adapter.Get();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.