Skip to main content

Hi,

How to add an action to a grid without modifying the aspx?

 

Thanks,

EV

You can add the action using the screen editor and thus avoid touching the .aspx file directly. 

What have you done so far?


Hi @edsonvelez64 

There is not other way but to add a piece of aspx code to the page:

<px:PXGrid  .....>   
<ActionBar>
<CustomItems>
<px:PXToolBarButton Text="Grid Action" DependOnGrid="gridThings">
<AutoCallBack Target="ds" Command="GridAction">
<Behavior CommitChanges="True" ></Behavior>
</AutoCallBack>
</px:PXToolBarButton>
</CustomItems>
</ActionBar>
</px:PXGrid>

This assumes you have an PXAction defined like:

public PXAction<MYThings> GridAction;
>PXUIField(DisplayName = Messages.Thing, Enabled = true)]
>PXButton(CommitChanges = true)]
protected virtual IEnumerable gridAction(PXAdapter adapter)
{
return adapter.Get();
}

Hope this helps


Hi,

Ok thanks. What happens if someone need to add a new action to a page in another customization project?  

 

Thanks,

EV


Hi @edsonvelez64 

 

Normally Acumatica merge the code when publishing. When 2 or more customizations are touching same objects a warning / error message is thrown. You have to use Level attribute on the customization package to tell Acumatica which package has priority over another.


Reply