You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Acumatica客户编辑页面(AR303000)自定义按钮点击事件不触发问题求助

Acumatica客户编辑页面(AR303000)自定义按钮点击事件不触发问题求助

我在Acumatica的自定义项目中,给客户编辑页面(AR303000)新增了一个名为「Sanctions」的标签页。在这个标签页里,我放置了一个网格和一个按钮,希望点击该按钮时能执行ExecuteSanctionsCheck()函数。

我是通过以下ASPX代码添加按钮的:

<px:PXTabItem Text="Sanctions">
     <Template>
         <px:PXLayoutRule runat="server" StartColumn="True" ID="CstPXLayoutRule4" />
         <px:PXFormView runat="server" Caption="Test" ID="CstFormView5" DataMember="CurrentCustomer">
             <Template>
                 <px:PXGrid ID="grid" runat="server">
                     <Levels>
                         <px:PXGridLevel DataMember="CurrentCustomer">
                             <Columns>
                                 <px:PXGridColumn Width="350px" DataField="UsrCheckMessage" />
                             </Columns>
                         </px:PXGridLevel>
                     </Levels>
                 </px:PXGrid>
                 <px:PXButton ID="btnSanctionsResult" runat="server" CommandName="SanctionsResult" Text="Sanctions Result" />
             </Template>
         </px:PXFormView>
     </Template>
 </px:PXTabItem>

之后我在CustomerMaint的扩展类中添加了对应的事件处理代码,但是点击按钮时事件完全没有触发,有没有大佬能帮我看看问题出在哪呀?

public class CustomerMaintExt : PXGraphExtension<CustomerMaint>
{
    public PXAction<Customer> SanctionsResult;
    [PXButton]
    [PXUIField(DisplayName = "Sanctions Result")]
    protected virtual IEnumerable sanctionsResult(PXAdapter adapter)
    {
        ExecuteSanctionsCheck();
        return adapter.Get();
    }
}

备注:内容来源于stack exchange,提问作者TheCoder

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.14 12:03:00