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
jkucerajkucera 

How do I create a splash page?

I've created a vf page, created a home page custom link, and overridden my tab w/ the vf splash page, but my buttons do nothing.

 

How do you create a method for "continue" and "Do not show this message again"? 

  

<apex:page title="About Lead Scoring"> <apex:sectionHeader /> Hi - I'm an about page <apex:form id="theForm" title="form"> <apex:pageBlock > <apex:pageBlockButtons > <apex:commandButton value="Continue" action="{!continue}"/>&nbsp;&nbsp;&nbsp; <apex:commandButton value="Don't Show Me This Again" action="{!????}"/>&nbsp;&nbsp;&nbsp; </apex:pageBlockButtons> </apex:pageBlock> </apex:form></apex:page>

 

 

The help isn't very helpful.   I might just give up on the tab so PE users can still use the app despite the tab limits.

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

At the moment your VF page does not have a controller, so there are no methods to call.

 

From the look of it you want a custom controller with two action methods:

 

continue - which returns a pagereference to the page you want them to end up on.

 

noshowagain - which updates a field on the logged in users record to indicate they shouldn't be shown the splash page and sends them on to the same page as the continue method.

 

I'd also suggest you want an action method that checks the 'don't show me again' field on the logged in users record and sends them elsewhere if it is checked.  You'd need to add this as an action attribute on the page component so that it was checked before the page was rendered. 

 

All Answers

bob_buzzardbob_buzzard

At the moment your VF page does not have a controller, so there are no methods to call.

 

From the look of it you want a custom controller with two action methods:

 

continue - which returns a pagereference to the page you want them to end up on.

 

noshowagain - which updates a field on the logged in users record to indicate they shouldn't be shown the splash page and sends them on to the same page as the continue method.

 

I'd also suggest you want an action method that checks the 'don't show me again' field on the logged in users record and sends them elsewhere if it is checked.  You'd need to add this as an action attribute on the page component so that it was checked before the page was rendered. 

 

This was selected as the best answer
adsfasdfasdfasdadsfasdfasdfasd

Obviously, setting up a Continue button to go on to the next page is trivial, but setting up a Don't Show This Again button is not ... particularly because this used to be standard, built-in functionality with S-Controls. Are you saying that if we set up a Visualforce splash page, we have to manage the flags to show/not show the splash page ourselves? If so, could you please point me to some documentation that says that, because I've done a search and the only thing that the Visualforce documentation says about splash pages is that they aren't compatible with mobile pages.

 

Thanks,

 

John

jkucerajkucera
Yup-that's what Bob's saying: you have to create and maintain your own flag for each user.  Not as easy as it could be, but not too bad after doing it once.
Keith654Keith654

I think I get the adding of flag(s) to the User object and having a controller checking and setting the flag(s). But does this mean a separate page/controller for each tab that either displays its splash page or returns a hard-coded PageReference? There doesn't seem to be much value added by the "Splash Page Custom Link" feature in that. Or am i missing something here?

jcherian2jcherian2

Is there anyway to display this page on login before the User's Home Page Tab is displayed, till they have selected "do not show again" button?

Marc C.Marc C.
I've taken to using a custom setting UserPref__c for such preferences and flags instead of adding custom fields to the User object. The advantage is separation of permissions and you can make a simple VF page which lets them see all their preferences and change them.