You need to sign in to do that
Don't have an account?
How to create a "Related to" picklist lookup field
My requirement is to create a field like "Related to" in this image.
Step1: Picklist with the Objects
Step2: On select of any one object, need to display all related records

Give me quick suggestion.
Thakns Niraj
Step1: Picklist with the Objects
Step2: On select of any one object, need to display all related records
Give me quick suggestion.
Thakns Niraj
Create a picklist fields with available object names in related to and create custom lookup as mentioned in Jeff's blog (http://blog.jeffdouglas.com/2011/08/12/roll-your-own-salesforce-lookup-popup-window/).
In the javascript function: baseURL(refer blog post page: MyCustomLookup), add a parameter to dynamically load the pass the object name to the new page.
Then read objectApiName in CustomAccountLookupController to dynamically fetch the records using dynamic SOQL and List<sObject>.
Hope it helps!
All Answers
Create a picklist fields with available object names in related to and create custom lookup as mentioned in Jeff's blog (http://blog.jeffdouglas.com/2011/08/12/roll-your-own-salesforce-lookup-popup-window/).
In the javascript function: baseURL(refer blog post page: MyCustomLookup), add a parameter to dynamically load the pass the object name to the new page.
Then read objectApiName in CustomAccountLookupController to dynamically fetch the records using dynamic SOQL and List<sObject>.
Hope it helps!
Hey! @Niraj,
Coul you share me the Source code for that part ....Actually I am stuck and not gettting how to approach
Click on SetUp (Gear Icon) and then click on the Object Manager.
Click on the object you will be adding the Look Up field to. ...
Select Fields & Relationships and thenNew.
Select Lookup Relationship from the Data Type list and click Next.
Regards: apktrolly (https://apktrolly.com/)
Add a Lookup Field to a Page Layout
Click. ...
Click the Object Manager tab.
In the list of objects, click the object you want to add the field to. ...
Click Fields & Relationships.
Click New.
Select Lookup Relationship and click Next.
Select the related object (for example, Language if you want to add a Language field).
Regards: rats urin smell (https://greenratcontrol.com/how-do-i-get-rid-of-the-rat-urine-smell-in-my-house/)