Skip to main content

Currently, a set of reports have been designed based on the type as Invoice, Debit Memo, Credit Memo and etc. Currently these reports can be accessed by the SO workspace menu items. Please check the below screenshot. 

Now user needs to directly run the appropriate report without navigating to workspace menu items. That means when user click the “PRINT INVOICE” button the pre designed set of report should be listed down like a dropdown and after selecting the relevant report, the report should be displayed.

So if you can provide guidance to perform this customization, it is highly appreciated. Thank you.

 I believe you’re asking how to add a menu button which can hold other action buttons.

This code came from here

public MyGraph()
{
MyMenu.AddMenuAction(Item1);
MyMenu.AddMenuAction(Item2);
}

public PXAction<SomeDAC> MyMenu;
PXUIField(DisplayName = "My Menu")]
PXButton(MenuAutoOpen = true)]
protected virtual IEnumerable inquiresMenu(PXAdapter adapter)
{
return adapter.Get();
}

public PXAction<SomeDAC> Item1;
PXUIField(DisplayName = "Item 1", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
PXButton]
public virtual IEnumerable item1(PXAdapter adapter)
{
throw new PXException("Item 1 clicked!")
}

public PXAction<SomeDAC> Item2;
PXUIField(DisplayName = "Item 2", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
PXButton]
public virtual IEnumerable item2(PXAdapter adapter)
{
throw new PXException("Item 2 clicked!")
}

 


Reply