I am creating a vue app that loads an iframe to show specialized information about an account. If the user wants to edit the account shown there is a hyper link and the href to the hyperlink looks like: 'salesforce1://sObject/[record_id]/view'. This url successfully navigates the user away from the iframe and back into the salesforce mobile app to view the account.

I wish to make something similar like this but instead of viewing an existing account I want the href link to create a new one and I cannot find it anywhere.


I have two ideas which you can try:-

  1. Use /lightning/o/Account/new? URL on onClick in your lightning component to create a record of type account. You can change the object name and it should work in Lightning mobile app.
  2. Use lightning:navigation component to navigate to a given pageReference or to generate a URL from a pageReference. It is supported in Mobile app too.

Read more about that here:- lightning:navigation

  • None of these worked. Thank you for helping me though. Ill find another solution. – Kevin Hernandez Apr 5 '19 at 19:33
  • Can you tell what is happening if you are following the above option? – sanket kumar Apr 6 '19 at 6:38
  • The first solution routes the user but it routes them within the iframe, I want it to exit the iframe and navigate them into the app. The second option just doesnt work at all. – Kevin Hernandez Apr 6 '19 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.