1

We have a custom detail page button that passes the object id to a VF page which then renders a visual workflow based on that ID.

Salesforce did support URL buttons in lightning before, but it seems to have been axed in spring '16. Now both onClick JS AND URL buttons do not work. The only one that works now is just VisualForce page, and I don't see any way to pass the object ID that way.

I thought about using the window.referrer method, as the object ID is in the url, but salesforce has an intermediary page between the button and the VF page, which takes out that solution.

How can I pass the object ID to the VF page?

Thanks!

1

If all I'm trying to get is the source object (and fields on the source object), it seems I can do that with a custom action, as described here:

http://resources.docs.salesforce.com/200/18/en-us/sfdc/pdf/actions_impl_guide.pdf#page=16

To get the object:

public getObj(ApexPages.StandardController controller) {
  parent = controller.getRecord();
  ..stuffs..
}

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.