Monday, 22 November 2010

Creating the Default View

I might attempt to write two posts in the next three days primarily due to the fact that Thanksgiving is coming up. I’m sure that I will be living in the local bars over the long weekend. If you spot me at First & Main, Old Pro, Blue Chalk, or Nola’s I’ll be sure to buy you a beer…or five.

When we left off we wanted to assign the page we created as the default view for the Scheduled Invoice object. Begin by going to the custom object definition for the Scheduled Invoice object and click ‘Setup’, then ‘Build’, then ‘Objects’ and scroll down to the ‘Standard Buttons and Links’ section. We can change the default view by clicking the ‘Override’ link next to ‘View’. The last step is to change the Content Type to ‘Page’ and the Content Name to ‘Scheduled Invoice View’. After hitting ‘Save’ we should have the following Visualforce page:



We need to go the Scheduled Invoice tab to open to invoice we created. Below the detail header there will be a ‘Paid Payments’ section that outlines the list of paid payments, their due dates, and their amounts. Test this page by creating a new invoice and marking a few of the payments as paid.

In the next post we will add a remarkable functionality to the object that will automatically mark overdue payments.

No comments:

Post a Comment