+ Start a Discussion

adding a custom object to visualforce page


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?

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:
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?