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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

to clear the value in multislect lookup using backspace

(1) ShareShare
ReportReport
Posted on by 1,836
I have created multiselect lookup on the standard form using event handler but  when i tried to clear the value using backspace the value does not get clear , can any one guide me on this how can i get this done .
 
 
 
thanks,
Regards,
Dinesh
I have the same question (0)
  • Dineshkarlekar Profile Picture
    1,836 on at
    I have created multislect lookup , it is working well , but when i tried to clear the values using backspace it does not clear the values the selected values appear again , i can only clear the selected values by deselect then , but i want it to get clear by backspace.
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    See basically this works same as multiple records selection in form where you can't just click backspace to unselect the selected records. Here if you want to unselect them, then you need to come to the Sales order name in the above and click and then it will give you name like begins with. Simply click clear and it will clear all selected records in the lookup.
  • Suggested answer
    Raj Borad Profile Picture
    1,578 on at
    Hi,
     
    You can select multiple records by selecting from the lookup and also by typing in the text box itself.
    As you see, it displayed separated with ";"
    You can also clear the value using backspace in the text box.
     
    Thank you,
    Raj Borad
  • Dineshkarlekar Profile Picture
    1,836 on at
    hi ,thanks for reply , is it possible to create the multiselect lookup on form string control using coc i am trying it but seems like i am not getting the form datasource below is my code , 
    class DTProductionOrderDetailslookup_Eventhandler
    {
         <summary>
        
         </summary>
         <param name="sender"></param>
        /// <param name="e"></param>
        [FormDataSourceEventHandler(formDataSourceStr(ProdTableCreate, ProdTable), FormDataSourceEventType::Initialized)]
        public static void ProdTable_OnInitialized(FormDataSource sender, FormDataSourceEventArgs e)
        {
            var overrides = DTProductionOrderDetailslookup_Eventhandler::construct();
    
            sender.object(fieldNum(ProdTable, DTSalesId)).registerOverrideMethod(methodStr(FormDataObject, lookup),
                methodStr(DTProductionOrderDetailslookup_Eventhandler,ItemId_OnLookup), overrides);
        }
    
        public void ItemId_OnLookup(FormStringControl _callingControl)
        {
    
            FormDataObject                 DTSalesId_do = any2Object(this) as FormDataObject;
            FormDataSource                 ProdTable_ds   = DTSalesId_do.datasource();
            FormStringControl ProdTable_DTSalesId = ProdTable_ds.formRun().design().controlName(formControlStr(ProdTableCreate, ProdTable_DTSalesId));
    
            QueryBuildDataSource qbds,qbds1;
            Query query = new Query();
            qbds = query.addDataSource(tableNum(SalesTable));
            qbds.addGroupByAndSelectionField(fieldNum(SalesTable,SalesId));
            TableId multiSelectTableNum = tableNum(SalesTable);
            container selectedFields = [multiSelectTableNum, fieldName2id(multiSelectTableNum, fieldStr(SalesTable,SalesId))];
            //MultiSelectInvoices.text(con2Str(SysLookupMultiSelectCtrl::constructWithQuery(element, this, query, false, selectedFields).getSelectedFieldValues(),';'));
            SysLookupMultiSelectGrid    lookupMS = new SysLookupMultiSelectGrid();
            lookupMS.parmCallingControl(_callingControl);
            //lookupMS.parmCallingControlId(CarrierTypeIdRecId);
            //lookupMS.parmCallingControlStr(CarrierTypeIdStr);
            lookupMS.parmQuery(query);
            //lookupMS.parmQueryRun(_queryRun);
            lookupMS.parmSelectField(selectedFields);
            lookupMS.run();
            container CarrierTypeCon = str2con(ProdTable_DTSalesId.text(),";");
            ProdTable_ds.object(fieldNum(ProdTable, DTSalesId)).setValue(con2Str(CarrierTypeCon, " ,"));
    
        }
    
        public static DTProductionOrderDetailslookup_Eventhandler construct()
        {
            return new DTProductionOrderDetailslookup_Eventhandler();
        }
    
    }
    please guide me if it is possible 
     
    thanks ,
    REGARDS,
    Dinesh
  • Dineshkarlekar Profile Picture
    1,836 on at
    hi rajborad  ,
    Thanks For the reply , 
    can you please guide me how can i get this done , can you please share the code .i want to do something like that .
     
    thanks,
    Regards,
    Dinesh 

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 461 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

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

#2
Subra Profile Picture

Subra 428

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans