function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MichaelpMichaelp 

New to Visualforce

Good Afternoon,

 

I have two custom objects that are both related to the Account Object via a look up relationship.

 

What I need to do is to create a Visual force page for “Sites” that uses one of the custom objects at the search eg. Object one is the Account numbers for the Accounts.

 

I then need the search to return details of the Account like its name and address (Read Only).

 

Then the User enters data into the fields of the second custom Object.

 

The issue I am having as I start my project is I’m using the fist Object as my standard controller

 

Custome_object__c  

 

But when I try to view the account name Custome_object__c .account.name

 

But I guess that is incorrect as I am getting errors

 

Any suggestion please

 

Thank you

sforce2009sforce2009
use Custome_object__r.account__r.Name
MichaelpMichaelp

Thank you for the fast reply

I will give this a go

 

is there any documentation that explanes the __c and __r