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
sangeeta.marathe@Futurewise.cosangeeta.marathe@Futurewise.co 

fetching custom field data

i am just a beginner on salesforce....

i have created a sample custom object which has fields of name and contact...

i have created the visual force page for the same...

i want to create an apex page to save the data using SOQL queires.

All the examples that i am getting is for standard objects...

Can i get some data for custom objects also.....

Best Answer chosen by Admin (Salesforce Developers) 
JD2010JD2010

First question is - unless you're trying to stylize the page to look different than Salesforce's layouts, why not just use SF's CRUD page to be able to insert, update and save?

 

To answer your question - when creating the visualforce page, where it says standardController="" just write the name of your custom object. Eg:

 

<apex:page standardController="MyCustomObject__c">
</apex:page>

From there, the simple way to invoke saves and all would most likely be to use the apex:commandButton. That'll help with making your saves, etc. More info:

http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_compref_commandButton.htm?SearchType=Stem