You need to sign in to do that
Don't have an account?

How to display fileds from two objects on one VS page?
I have page which use standard controller of Order__c with extension:
<apex:page standardController="Order__c" extensions="newOrderController" />
I am able to display fields from Order__c:
<apex:inputField label="Variant" value="{!Order__c.type__c}"/>
on the same page want to place fields from EndUser__c object like that:
<apex:inputField label="Phone" value="{!End_User__c.phone__c}"/>
it cause an error: Error: Unknown property 'Order__cStandardController.End_User__c
So I added in controller:
sObject endUserObj = new End_User__c(); //End User Object
and trying to acces fields of variable which hold an object:
<apex:inputField label="Phone" value="{!endUserObj.phone__c}"/>
but still getting:
Error: Unknown property 'Order__cStandardController.cmEndUserObj'
Tried to use this get and set methods:
public sObject getEndUserObj () { return endUserObj; } public void setEndUserObj (sObject o) { this.endUserObj = o; }
but then getting error:
Error: Read access denied for {0}
What kind of getters and setters should I use?
Thanks to Prasanna__d for tip.
I found best solution which is just one line:
Thats all, it contains standards get and set methods so no need to write own. Public modificator is mandatory without it will not work.
Now I can acces my object in VS by:
All Answers
Instead of
Thanks to Prasanna__d for tip.
I found best solution which is just one line:
Thats all, it contains standards get and set methods so no need to write own. Public modificator is mandatory without it will not work.
Now I can acces my object in VS by: