3

This questions is a result of an earlier question about jumping to a VF page in a browser from SFDC1 (Link to full site in Salesforce1?). On the iPad, it is possible to go to any URL from SFDC1 by using the javascript window.open call. No matter what parameters you pass in, the subsequent window always opens as an InAppBrowser window, not in Safari. Now once you are inside InAppBrowser, and you create or edit a record which has a lookup, clicking on the lookup icon takes you, as expected, to the standard lookup search layout. However, clicking on any of the search results has no effect. It does not take you back to the page being edited with the selected value populated in the lookup field. It just stays on the lookup search layout. This seems to happen on any object, with any lookup field.

Thx, Hamayoun

1 Answer 1

3

Clicking the icon for a standard lookup will attempt to open a popup window for you to select from, and once you have made the selection some JavaScript runs to update the lookup in the parent window and close the popup.

When you try to open a popup window in the inAppBrowser, this simply replaces the current URL with the popup URL. Thus when you make a selection, the JavaScript that attempts to update the lookup in the parent window will fail, as the parent window doesn't exist any more.

3
  • isn't there any fix for this? Do you know how we can show a Lookup field in Salesforce1 app on a Visualforce page?
    – VarunC
    Apr 9, 2014 at 14:44
  • I believe this now works on the installed app on iOS 7, where it takes you to a search page. The last time I tried android it didn't work. Apr 9, 2014 at 15:35
  • I am opening a VF page in an iFrame and it opens fine with inputField of Lookup type showing as the way it works in Standard Lookup popup image link. And it opens a screen where when I select a record, it does not do anything and never close :( ... Isn't there a way we can show Lookup fields in VF pages in Salesforce1 like the way Salesforce do, with an integrated search button right within the textbox?
    – VarunC
    Apr 10, 2014 at 12:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .