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
ckellieckellie 

Help with Using fields in Custom Objects with the Inputfield command.

I am trying to design a visualforce page tha creates Account, Contact, and Opportunity records. I also am needing to send values to a custom object. The problem is that I cannot find the correct syntax to pull the field from the custom object.

 

for example

Standard is {!Opportunity.Name}

Custom is ???

 

I have read about the term "MyCustomObject__c" but cannot get it to work.

 

Can anyone help?

 

 

Best Answer chosen by Admin (Salesforce Developers) 
dev_forcedev_force

To use {!MyCustomObject__c.fieldName}

 

You need to have standardController="MyCustomObject__c" in your page tag

All Answers

dev_forcedev_force

To use {!MyCustomObject__c.fieldName}

 

You need to have standardController="MyCustomObject__c" in your page tag

This was selected as the best answer
ckellieckellie

Thank you for the help.

 

I am still receiving errors.

 

 

At the top of the page, I have written:

<apex:page StandardController="MyCustomObject__c"...

 

I receive the error message:

"Error: MyCustomObject__c does not exist"

 

The custom object is: MDS__c

 

If I substitute MDS__c, I receive the error:

 

Error: Unknown method 'MDS__cStandardController.step1()'

 

Any more thoughts?

dev_forcedev_force

Do you have a custom button linked to a method called "step1()" ?

 

You'll have to define "step1()" in a controller extension.

ckellieckellie
Thank you.