Monday, 27 February 2017

Hide Action from Datasource

Hi All,

When you new create action in the PXGraphExtensions, it is automatically getting visible in in the data-source actions bar, even if you have not customized ASPX.
public class JournalEntry_Extension:PXGraphExtension<JournalEntry>
{
    public PXAction<PX.Objects.GL.BatchNewAction;  
    [PXButton(CommitChanges true)]
    [PXUIField(DisplayName "New Action")]
    protected void newAction()
    {
    }
}
It looks like here:

But if you want to hide that button, it is very easy to do it with Customization Browser. Just drag and drop button to the data-source in page editor:

Than just set the Name to your action name and Visible to false.

That is all. Now Action is not visible anymore.

Have a nice development!

No comments: