0
votes

I have created a Inquiry-Page which has a grid and i am using VirtualDAC to bind the Grid, I want to add custom action button to process one or more record, I added a custom Action button but Action button is not showing, I have used below code

 public PXAction<QCOrderVirtualDAC> ActionMenu;
 [PXButton(SpecialType = PXSpecialButtonType.Default)]
 [PXUIField(DisplayName = "Action", MapEnableRights = PXCacheRights.Select)]

protected virtual IEnumerable actionMenu(PXAdapter adapter) {
    return adapter.Get();
}

also call method in class constructor to add Action button,

this.ActionMenu.MenuAutoOpen = true;
this.ActionMenu.AddMenuAction(this.AssignTo);

But still button is not showing, How may i add custom Action button in InquiryPage?

1
Is QCOrderVirtualDAC the primary DAC of your primary DataView (i.e. The first DAC of the first DataView) ? - Joseph Caruana
No, I have been using Filter as Primary view for example: public PXFilter<DocFilter> Filter; public PXFilter<DocFilter> Cancel; - user_mat
Try changing to PXAction<DocFilter> and let me know if it works. - Joseph Caruana
Thanks, I removed pxFilter and set my VirtualDAC as primaryview then Grid show Action button, But what happen, I have a slect checkbox column, when i select it then page postback and grid column data are blanks, it happen with few columns only not all, and when i click on Action button then checkbox columns uncheck, do you know? - user_mat
The fields which disappear - are they fields from relationships? Or fields present in the same database table as your DAC? - Joseph Caruana

1 Answers

0
votes

In your case, it is important that QCOrderVirtualDAC is the primary DAC of your primary DataView. This means that it should be the first DAC of the first DataView. Actions need to be defined against your primary DAC.

Refer to Acumatica documentation for more details regarding Primary Views: https://help-2020r1.acumatica.com/(W(1))/Help?ScreenId=ShowWiki&pageid=cd8f9db9-2965-4ce4-9ae8-4714898fdc44

As defined in this link: The data view that is specified as the primary view for the ASPX page must be defined the first one in the graph.