You need to sign in to do that
Don't have an account?
raga80
How to open parent records from custom button on child
Hi all, i have a custom object that is a related list of opportunity Object. Inside my custom object i have a custom buton that open a visualforce page with renderas=PDF.
<apex:page standardController="MiCustomObject__c">
How can i access Opportunity field from this page?
Can i access parent object from child?
Regards
<apex:page standardController="MiCustomObject__c">
How can i access Opportunity field from this page?
Can i access parent object from child?
Regards
All Answers
<table border="0" width="340">
<tr><td><strong>Buyer:</strong></td></tr>
<tr><td>{!Rata__c.Payment_Account__R.Name}</td></tr>
<tr><td>{!Rata__c.Payment_Account__R.BillingStreet}</td></tr>
<tr><td>{!Rata__c.Payment_Account__R.BillingCity}</td></tr>
<tr><td>{!Rata__c.Payment_Account__R.BillingCountry}</td></tr>
<tr><td>{!Rata__c.Payment_Account__R.BillingPostalCode}</td></tr>
<tr><td>{!Rata__c.Opportunity.Name}</td></tr>
</table>
</apex:page>
there is a master detail relationship bettween Opportunity and Rata__C
Replace you below line
with
If this solves your problem, kindly mark it as the best answer.
Thanks,
Vatsal
Error: Invalid field Opportunity__r for SObject Rata__c
I think that the problem is view parent field from child object
The api name is Opportunita__c then :
{!Rata__c.Opportunita__r.Name}