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
Antoine LELEU 10Antoine LELEU 10 

Open VF page from a record to new page in Ligthning Experience !

Hello,

I would like to migrate a visualforce page to lightning experience. i could implement it using quick action in account object but the VF page open in pop up.
Do you know if it exist a way to open vf from an record in a new page in lightning experience ?

Thanks,
Antoine  
Best Answer chosen by Antoine LELEU 10
Michał Zadrużyński 2Michał Zadrużyński 2
Here you go:
<script>
sforce.one.navigateToURL("/apex/mypage?id="
			            +"{!Opportunity.Id}");	
</script>

I was writing this from tablet in bus and apparently I forgot about quotes.

All Answers

Michał Zadrużyński 2Michał Zadrużyński 2
I did it like this. Quick action opens empty page that uses standard controller and redirects to target page like this: <script>
sforce.one.navigateToURL("/apex/mypage?id="+{!Opportunity.Id});
</script>
target page will open in full size and albo can use standard or custom controller
Antoine LELEU 10Antoine LELEU 10
Hi Michal,

Thanks for your answer.
I tried to implement your solution but it doesn't work. i obtain this Javascript error :Uncaught SyntaxError: Unexpected token ILLEGAL
Can you share the full code of your page ? 

Thanks you very much for your help,
Antoine
 
Michał Zadrużyński 2Michał Zadrużyński 2
Here you go:
<script>
sforce.one.navigateToURL("/apex/mypage?id="
			            +"{!Opportunity.Id}");	
</script>

I was writing this from tablet in bus and apparently I forgot about quotes.
This was selected as the best answer
Antoine LELEU 10Antoine LELEU 10
Great ! 
i tried severals syntaxes but i didn't find the good one. 

One again, thank you very much !