Find your content:

Search form

You are here

Splash page with a don't show again, check-box


I'm thinking I could develop a Visual force splash page to notify users. And include a 'don't show again' check-box. Has anyone accomplished something similar and do you have any suggestions? As for the check-box it could check a flag condition or is there a way to check sessions variables? Or would the custom home page component be a better option?

Attribution to: Miklr

Possible Suggestion/Solution #1

As requested, here is some sample javascript for using the ajax toolkit from a homepage component. There are 2 ways you could keep track of the users splash page preference both outlined in other answers, my preference would be custom settings.

Working with custom settings in the ajax toolkit is not the same as apex code, there is no cache. You need to query the settings with soql, I've added comments for how I would handle the query.

<script type="text/javascript">
    //ApiUtils is unsupported internal javascript and could break at any time
    var __sfdcSessionId = ApiUtils.getSessionId();
<script src="/soap/ajax/26.0/connection.js" type="text/javascript"></script>
<script type="text/javascript">
    //UserContext is unsupported internal javascript and could break at any time
    var userId = UserContext.userId;
    //get the custom settings
    var result = sforce.connection.query("Select Id, Show_Splash__c from Custom_Setting__c WHERE SetupOwnerId = '" + userId + "' LIMIT 1");
    //if there is no result (the custom settings do not exist for the user) or Show_Splash__c == true
    //use javascript to redirect to your splash page

Once redirected to the splash visualforce page you have all the tools back, and you can more easily manipulate the custom settings in the controller.

Attribution to: Daniel Blackhall

Possible Suggestion/Solution #2

A hierarchical custom setting where you can specify a value per user, could be a possible solution to hold the dismiss value once a user has checked it.

Attribution to: techtrekker

Possible Suggestion/Solution #3

Depending on how you would like to implement this, Salesforce already provides some options.

Custom tab's allow a "Splash Page Custom Link" to be defined, the Custom links that show in the drop down are configured under Setup -> Customize -> Home -> Custom Links. And one of the link types you can create is a visualforce page.

Splash Page Definition

As part of the splash page, there is a checkbox where the user can turn off the splash page.

So this will only work if you are able to define it as part of a tab, but hopefully this meets your needs.

Attribution to: Daniel Blackhall

Possible Suggestion/Solution #4

One interesting thought is lets have a boolean on user Object and a jquery component inside the Visualforce component or a simple visulaforce component using javascript and lets render on the page depending on the boolean thats set by user using getter setter on the page .You may use outputPanel to hold the component and use render attribute to decide to whether show on the page or not.


Attribution to: Mohith Shrivastava
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content