Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

MultiSelect Control

Posted on by Microsoft Employee

Hi everyone,

I'm trying to use two multiselect control; one for Custaccount , and one other for custGroup.

I'm wondering to disable the second multiselect if i check same lines from the first one.

I have tried to override mofidied method but following code with debugger i have  found that the method didn't be even ritched.

I Have used FormStringBuildControl with FormStringControl,  then i have used only FormStringControl with a simple dialog fields, and the following override statements

//formRun.controlMethodOverload(true);
//formRun.controlMethodOverloadObject(this);

Any Suggestion please?

public Object dialog()
{

    dialog = super();

    dialog.alwaysOnTop(true);
    dialog.windowType(FormWindowType::Standard);
    dialogGrp = dialog.addGroup('Group');


    customerAccountDlg = dialog.addField(extendedTypeStr(CustAccount));
    customergroupDlg   = dialog.addField(extendedTypeStr(CustGroupId)); 


    return dialog;
}



public void dialogPostRun(DialogRunbase _dialog)
{

    FormRun formRun;

    super(_dialog);
    formRun = _dialog.dialogForm().formRun();

//formRun.controlMethodOverload(true);
//formRun.controlMethodOverloadObject(this); if (formRun) { fsCtrlMultiSelectAccount = customerAccountDlg.control(); fsCtrlMultiSelectGroup = customergroupDlg.control(); msCtrlAccount = SysLookupMultiSelectCtrl::constructWithQuery(formRun, fsCtrlMultiSelectAccount, this.buildQuery()); msCtrlGroup = SysLookupMultiSelectCtrl::construct(formRun, fsCtrlMultiSelectGroup, querystr(QueryForGroup)); fsCtrlMultiSelectAccount.registerOverrideMethod(methodStr(FormStringControl,modified), methodStr(ExportLookupV2, Fld1_1_modified), this); fsCtrlMultiSelectGroup.registerOverrideMethod(methodStr(FormStringControl,modified), methodStr(ExportLookupV2, Fld2_1_modified), this); } }

Thanks.

*This post is locked for comments

  • Suggested answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: MultiSelect Control

    Alternatively you may create a custom form lookup and pass in the values to be ignored with Args(), but for handling the return value of the multi-selection there you have to write your own code, i.e. storing it in a set.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: MultiSelect Control

    Hi!

    fsCtrlMultiSelectAccount.registerOverrideMethod(methodStr(FormStringControl,modified), methodStr(ExportLookupV2, Fld1_1_modified), this);

    change

    customerAccountDlg.registerOverrideMethod(methodStr(FormStringControl,modified), methodStr(ExportLookupV2, Fld1_1_modified), this);

    It's work

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans