You need to sign in to do that
Don't have an account?
Princes91221
How to save multi select lookup values
Hi Everyone,
I have created a multi select lookup component in Account object.
Below I am pasting the code.
I want to save the select lookup in lead object under a custom field.
Any help is appreciated.
Thanks in advance!
I have created a multi select lookup component in Account object.
Below I am pasting the code.
public class reUsableMultiSelectLookupCtrl { @AuraEnabled(cacheable=true) public static List<sObject> retriveSearchData(String ObjectName, String fieldName, String value, List<String> selectedRecId) { List<sObject> sObjectResultList = new List<sObject>(); if(selectedRecId == null) selectedRecId = new List<String>(); if(String.isNotEmpty(value)) { String query = 'Select '+fieldName+' FROM '+ObjectName+' WHERE Name LIKE \'%' + value.trim() + '%\' and ID NOT IN: selectedRecId order by createdDate DESC LIMIT 5'; for(sObject so : Database.Query(query)) { sObjectResultList.add(so); } } return sObjectResultList; } }
I want to save the select lookup in lead object under a custom field.
Any help is appreciated.
Thanks in advance!
Can you elaborate more on the ask?
What is the type of the custom field?
Type of custom field is Textarea.