在声明中允许更改

问题描述 投票:0回答:1

我正在尝试在单个字段上更改allowedit值,但无法进入。但是我收到发件人错误,并且期望“。” )和]之间进行验证)]

[FormControlEventHandler(formControlStr(ProdParmReportFinished, ProdParmReportFinished_EndJob), FormControlEventType::Validating)]
         public static void ProdParmReportFinished_EndJob_OnValidating(FormControl sender, FormControlEventArgs e)
         {
             FormRun sender = Args.getThis();
             sender.control(sender.controlId(formControlStr(ProdParmReportFinished, ProdParmReportFinished.EndJob))).allowEdit(false);
         }
axapta microsoft-dynamics x++
1个回答
2
投票

如果您正在使用扩展程序,请尝试类似的事情

[PostHandlerFor(formStr(YourForm), formMethodStr(YourForm, YourMethod))]
    public static void YourForm_xxx(XppPrePostArgs args)
    {
        FormRun sender = Args.getThis();
        sender.control(sender.controlId(formControlStr(YourForm, YourDatasource_Field))).allowEdit(false);
    }

右键单击并选择复制事件处理程序方法,将正确的方法结构复制给您,然后输入代码

© www.soinside.com 2019 - 2024. All rights reserved.