+ Start a Discussion
Praful GadgePraful Gadge 

How to pass record Id in Global Action for VF page in Lightning Experience?

We are trying to create a global action which is dynamic (as it can be added for any sObject).
However we need to fetch the current recordId from the detail page of the sObject's record into our VisualForce page(which is called from global action). We can't use a standard controller in VF page to fetch the Id as the action can be fired from any sObject.

The URL we see for record detail page in Lightning Experience window is - 
https://trekbindev-dev-ed.lightning.force.com/one/one.app?source=aloha#/sObject/001B0000004XwqlIAC/view?t=1441350807320

The javascript's methods for fetching URL doesn't seem to give the recordId in Lightning view either, as the page is opening in iFrame, screenshot
is added below:
VF page opening in iFrame

However, this function was achieved via button to add ID parameter in page for SF Classic UI, it is as follows.

Button

How can we accomplish this in Lightning Experience?

Thanks in advance!
Charles Naccio 2Charles Naccio 2
We're also trying to figure this one out?
Mohammad Anzar 2Mohammad Anzar 2

Hi Praful,

Were you able to pass the record Id? I am too facing the same issue.

Linked2MarkLinked2Mark
I am trying to do the same thing. I havent been able to figure out how to do it.
mansoor ahmed 20mansoor ahmed 20
please let me know the solution, if anyone have?