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
MarkMCCMarkMCC 

New to Apex and Visualforce

Hello,

         I'm trying to build a simple table that will display our daily bookings by rep.  I have built the visusalforce page, but I'm having problems with creating the controller to pull the data.  There are only 3 fields in this object they are:

Name

Total_Booked__c

Number_Of_Orders__c

 

Any help would be greatly appericated! 

bob_buzzardbob_buzzard

Can you give us a bit more information?  

 

It sounds like you should be able to use a standard controller, but you will need to pass some information on the URL for the page.  How are you navigating to the page (custom button?) 

MarkMCCMarkMCC

Using Sites... 

 

So its a URL you go to and it pulls back the data from our Bookings__c object.

bob_buzzardbob_buzzard

So do you know the id of the Bookings__c object that you want to display?  If you do (e.g. maybe they choose from a list), you can simply add the id to the end of the URL, e.g.

 

/apex/MyCustomPage?id=<the_Id>

 

and then you can use a standard controller which will retrieve the object you have identified by its id.