web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested answer

RegisterOverrideMethod is not getting called in postrun() method of UIBuilder Class.

(0) ShareShare
ReportReport
Posted on by 1
Hi Team, 
Consider me as new X++ learner. 
I am working on SysOperationFramework where i am adding function for dialog field enable/disable for two fields. 
I have three fields as parameter where; 
Field1 - Customer Group  - type : CustGroupID 
Field 2 - Show lookup for selecting single customer for select customer group in Field 1.  - type : AccountNum
Field 3 - Show lookup for selecting multiple customers for selected customer group in field 2. - type - List , Type::String

I am trying to add a condition, where,
  1. if user select value in Field 2, Field 2 gets disabled
  2. if user select value in field 3 from multiselect dropdown, field 2 gets disabled.
 
In my case, the 1st condition is working fine , but 2nd condition is not working at all, even tried to debug but the registeroverride method for second condition is not even getting hit during control modification on dialog UI. Interestingly, the debug process is working well for 1st condition. 
class SSOFCustInfoUpdateUIBuilder   extends SysOperationAutomaticUIBuilder
{
    SSOFCustInfoUpdateContract  contract;
    DialogField             custAccountDlg, custGrpDlg, custAccountList, custName;
 
    public void postbuild()
    {
        contract = this.dataContractObject() as   SSOFCustInfoUpdateContract;

        custAccountDlg  = this.bindInfo().getDialogField(contract, methodStr(SSOFCustInfoUpdateContract,parmCustAccount));
        custGrpDlg      = this.bindInfo().getDialogField(contract, methodStr(SSOFCustInfoUpdateContract,parmcustGroupId));
        custAccountList      = this.bindInfo().getDialogField(contract, methodStr(SSOFCustInfoUpdateContract,parmCustomerIdList));      
      
    }
    public void postrun()
    {
       // super();
        custGrpDlg.registerOverrideMethod(methodStr(FormStringControl, lookup),methodStr(SSOFCustInfoUpdateUIBuilder,custGroupLookup), this);
        custAccountDlg.registerOverrideMethod (methodStr(FormStringControl, lookup), methodStr(SSOFCustInfoUpdateUIBuilder, custAccountLookup), this);
        custAccountList.registerOverrideMethod (methodStr(FormStringControl, lookup), methodStr(SSOFCustInfoUpdateUIBuilder, multiselectLookup), this);
        custAccountDlg.registerOverrideMethod(methodStr(FormStringControl, modified), methodStr(SSOFCustInfoUpdateUIBuilder, custAccountModified), this);
        custAccountList.registerOverrideMethod(methodStr(FormStringControl, modified), methodStr(SSOFCustInfoUpdateUIBuilder, custListModified), this);

            
    }
 
I have the same question (0)
  • CU22090843-0 Profile Picture
    1 on at
    RegisterOverrideMethod is not getting called in postrun() method of UIBuilder Class.
    Hi @Sagar, 

    Since I have requirement to get values based on user selection, i have used 
    SysLookupMultiSelectGrid::lookup(query,_listControl,_listControl, _listControl, conSalesResponsible); 

    Is there any alternative way to apply my validation on another field while having values in from multiselect grid control. 
  • Suggested answer
    Sagar121 Profile Picture
    650 on at
    RegisterOverrideMethod is not getting called in postrun() method of UIBuilder Class.
    Hi , For mutli lookup are you using SysLookupMultiSelect Ctrl? If yes then these methods don't call super .

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 523

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 214 Super User 2025 Season 2

#3
Yng Lih Profile Picture

Yng Lih 138

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans