You need to sign in to do that
Don't have an account?
Alpesh Patel 16
Pass reference of parent object on click of button located on related object
Hi Everyone,
I have a custom object A and related custom object B. I have put a button on related object B. When I press this button, I show a visualforce page that contains a grid of table data with checkboxes and a process button. Upon clicking this process button, I do some processing which requires data from the Parent Object A.
How can i pass data or reference of object A in the custom VF page of Object B and use it in cotroller class of object B.
Thanks.
I have a custom object A and related custom object B. I have put a button on related object B. When I press this button, I show a visualforce page that contains a grid of table data with checkboxes and a process button. Upon clicking this process button, I do some processing which requires data from the Parent Object A.
How can i pass data or reference of object A in the custom VF page of Object B and use it in cotroller class of object B.
Thanks.
You can create a new list button on your child object and you can pass parent object id using following code. Lets say your parent object id is Invoice__c you can right following code
and on new vfpagename controller you can create object record
Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant
P.S. If my answer helps you to solve your problem please mark it as best answer.