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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Need to clear mark from multi select lookup

(0) ShareShare
ReportReport
Posted on by 16
Hi All,
 
In form , Suppose I have two lines
 
 
So, here the recepie store group is MultiselectLookup column.
 
 
Suppose I have select the two values from the lookup as mentioned in above pic then click on select.
 
Now In second line click on lookup. The moment I select the lookup in 2nd line , it will show the marked values in lookup which I already selected for the previous line in below picture
 
 
The requirement is , the moment when we click on the multiselect lookup it SHOULD NOT MARK any values in lookup.  How I can remove the mark from the mutiselect lookup?
 
Code - 
 
public SysLookupMultiSelectCtrl    msCtrl;       /// <summary>    /// Building the DocuType query    /// </summary>    /// returns the Docutype Query    public Query buildDocuTypeQuery()    {        Query       docuTypeQry = new Query(queryStr(UCLRecipeGroupsQry));        return docuTypeQry;    }[FormEventHandler(formStr(UCLModifierGroup), FormEventType::Initialized)]    public  void UCLModifierGroup_OnInitialized(xFormRun sender, FormEventArgs e)    {        Query               docuTypeQry         =   this.buildDocuTypeQuery();                       FormStringControl   DocuTypes        =   this.design().controlName('UCLModifierGroupLine_UCLRecipeStoreGroups');        InventParameters    inventParameters    =   InventParameters::find();                 msCtrl   = SysLookupMultiSelectCtrl::construct(this,                                            DocuTypes,                                            querystr(UCLRecipeGroupsQry),                                            false,                                            [tableNum(UCLRecipeStoreGroup), fieldNum(UCLRecipeStoreGroup,Name)]);                msCtrl.refreshQuery(docuTypeQry);        UCLModifierGroupLine    line    =   this.dataSource(FormDataSourceStr(UCLModifierGroup, UCLModifierGroupLine)).cursor() as UCLModifierGroupLine;        if(line.RecId)        {            msCtrl.set(this.getSelectedNotes(this.getSelectedFields()));        }                          }    public str getSelectedFields()    {        container selectedfields;                str ret;        UCLRecipeStoreGroup groupStore;        while select groupStore        {            selectedfields+=groupStore.Name;        }                ret = con2Str(selectedfields,';');        return ret;    }    /// <summary>    ///    /// </summary>    /// <param name=/sender/></param>    /// <param name=/e/></param>    [FormControlEventHandler(formControlStr(UCLModifierGroup, UCLModifierGroupLine_UCLRecipeStoreGroups), FormControlEventType::Modified)]    public  void UCLModifierGroupLine_UCLRecipeStoreGroups_OnModified(FormControl sender, FormControlEventArgs e)    {        FormRun     formRun = sender.formRun();                UCLModifierGroupLine    line    =   formRun.dataSource(FormDataSourceStr(UCLModifierGroup, UCLModifierGroupLine)).cursor() as UCLModifierGroupLine;        if(Line)        {           line.UCLRecipeStoreGroups     =   con2Str(msCtrl.getSelectedFieldValues(), ';');                                }                  }
 
 
I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at
    Hi, it looks like a custom form.If yes then you don't need to create event handler methods like OnInitialized, init method can be overrided directly. Regarding your issue, check these articles
     
     
    https://ax2012anant.blogspot.com/2021/04/multi-select-lookup-on-form-control-in.html
     
     
  • Community member Profile Picture
    16 on at
    Hi Mohit, thanks for the response.
     
    Sorry, not understand what changes are required for me to resolve my issue.
     
    I hope you understand my issue.
     
    Kindly elaborate please 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 510 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 399

#3
Adis Profile Picture

Adis 251 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans