You need to sign in to do that
Don't have an account?
Vladimir Bessonov
find record by record id in lookup field?
how to search with record id in lookup field?
it is wastful to create extra field for the name and have auto enumaration for name
I found an option to change search layout - add some other field there, but it still looks only for name ? is there any workaround? to me Record is explicit enough to find the record.
it is wastful to create extra field for the name and have auto enumaration for name
I found an option to change search layout - add some other field there, but it still looks only for name ? is there any workaround? to me Record is explicit enough to find the record.
Hi Vladimir,
Your requirement is not clear . Please give us detail requirement.
1. Are you talking about record id or record type id.
2.Are you getting record id from VF page or Aura component.
Please share an simple Example of your requirement.
Thank you
I have Lookup field.
I need to select an record for this lookup field.
I have many objects with the same name. they have some other fields that makes them different and one field is unique - Record ID.
When you search the record in lookup field - it searchs only record name. I wanted to use record id for that.
It shall be clear now.
Searching with record id on standard lookup is not allowed. You may have to design a custom solution to get through your requirement.
Alternatively you can add more fields on search layout to mark your designated record. Then search for all records under lookup dropdown and look out for your record.
https://help.salesforce.com/articleView?id=sf.customize_searchlayout.htm&type=5 (https://help.salesforce.com/articleView?id=sf.customize_searchlayout.htm&type=5" target="_blank)
https://help.salesforce.com/articleView?id=sf.search_enhanced_lookup_specify_filters.htm&type=5 (https://help.salesforce.com/articleView?id=sf.search_enhanced_lookup_specify_filters.htm&type=5" target="_blank)
Also to your question, one lookup can only be linked with one object unless the lookup is customized lookup. So having same name for many objects here doesn't matter.
It still looks only for record name.
then you will get the more detailed view of lookup result like below
and this will have all your search layout fields so you can choose from the available options. But yes there is no option to search with ID as you are trying with standard lookup.
Still if you wish to search with your own field, consider customizing your lookup by creating custom lookup for search. This is not OOB salesforce feature and need to code to achieve this.
Hope this answers your question.