+ Start a Discussion
Mike Lee PCLMike Lee PCL 

List view button - passing parent object ID to VF page


I have a custom object (cust_obj) that is the detail of a master-detail relationship. Opportunity is the master.

I created a List view button that opens a VF page. The purpose of the button is to allow a user to create a new cust_obj record.

The button is shown on cust_obj's related list as seen via the Opportunity record. What I'm not sure of is how to send/tell the VF page what the parent Opportunity ID is. Currently when I click on the button the VF page will appear but it has no idea what the Opportunity is.

Does anyone know how to accomplish this? What caveat is the users of this button will be all using Lightning so ithe solution must work in LEX.