function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ProlayProlay 

Displaying the Lookup and Master-Detail Lookup fields in Android and IOS native application

Dear Flocks,

I have searched the Mobile SDK developer guide but did not find how to display the Lookup and Master-Detail lookup fields in native Android and IOS applications. Can somebody point me to some solution on the same?

Thanks in advance!
Best Answer chosen by Prolay
Abhishek BansalAbhishek Bansal
Hi Prolay,

You have to handle the lookup functionality by your own.
Please follow the below steps and try to develop a lookup field for your application :
1. Create a input field and add the lookup icon in front of it.
2. Call a method onclick of this lookup icon.
3. This method will query all the records of lookup object.
4. On complete of this method show a section that will display the records and hid the main section.
5. Onclick of Cancel or Name of any record call a method
6. This method will set the selected value in input field.
7. Hide the lookup section and show the main section.

Unfortunately you have to handle all these steps by your own as there is no such thing available in Salesforce1 that can help us to show lookup records.
Please let me know if you need more help or information on this.

Thanks,
Abhishek Bansal

All Answers

sharathchandra thukkanisharathchandra thukkani
Hello prolay, you want to show the meta data(fields) or records of the object using mobile SDK, be specific
ProlayProlay
Thanks for your quick reply. I want to show the lookup fields in my native app as we show it in VF pages.
Abhishek BansalAbhishek Bansal
Hi Prolay,

You have to handle the lookup functionality by your own.
Please follow the below steps and try to develop a lookup field for your application :
1. Create a input field and add the lookup icon in front of it.
2. Call a method onclick of this lookup icon.
3. This method will query all the records of lookup object.
4. On complete of this method show a section that will display the records and hid the main section.
5. Onclick of Cancel or Name of any record call a method
6. This method will set the selected value in input field.
7. Hide the lookup section and show the main section.

Unfortunately you have to handle all these steps by your own as there is no such thing available in Salesforce1 that can help us to show lookup records.
Please let me know if you need more help or information on this.

Thanks,
Abhishek Bansal
This was selected as the best answer
ProlayProlay
Thank you for your solution. I will mark it as the best answer. Allow me some more inputs from the fellow developers.