+ Start a Discussion
baller4life7baller4life7 

SWITCHING content on a site daily

Hi guys,

I imagine a visulaforce site with a daily switching content (i.e. tip of the day). What would be the best solution to implement this requirement?

 

Thank you,

Josh

sfdcfoxsfdcfox

This could be done a number of ways. Here's probably the way I would accomplish this:

 

* Custom object that stores quotes for each day. It should maintain a sequencial order of records numerically, perhaps through a trigger or bulk update code.

* When displaying the page, query the highest sequence number, convert the current date into a number of days, divide that number by the number of record sequences (using modulus division), and then retrieve the record that matches that result.