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
jcaldjcald 

adding a custom object to visualforce page

Hi

I have created a custom object that contains vendors with one field (price). I would like to add the (price) field from these vendors in my visualforce page. How do I call out a vendor ID and its field in apex code? do I add to my existing standardcontroller?

Thanks
Sonam_SFDCSonam_SFDC
Using a datatable you can  show the records in the vendor object and use a standard controller extension - write a method to add the value of the price field to show you the total :

check the following H&T doc for sample code:
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_dataTable.htm
jcaldjcald
The page says "you must associate the Visualforce page with a valid account record in the URL." ex. https://Salesforce_instance/apex/myPage?id=001D000000IRt53

Which I already do have...

My intent is to reference another ID on the same page. Here's the workflow on the user side to help understand where I want to go.

Account > Opportunity > Worksheet > View Vendors Options (Multiple) > Select (vendors / prices) > Save Worksheet

View Vendors Options (Multiple) - how do I show these vendors and their prices on my visual page?