2

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?

4 Answers 4

3

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. http://blog.jeffdouglas.com/2010/02/08/using-hierarchy-custom-settings-in-salesforce-com/

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.

3
  • I like this, thanks for taking the time. I guess there's no way to add a temporary custom page to the current Home tab? I see you can make home tab components and new layouts. It's too bad can't have a layout show for a period of time.
    – Miklr
    Commented Oct 10, 2012 at 19:47
  • It would be possible to use a home page component, but it would require the ajax toolkit, and the use of unsupported salesforce features (i.e it could break at any time). I will post it as another answer if you're interested Commented Oct 10, 2012 at 21:33
  • Sure, if you have the time. I'm familiar with the ajax toolkit. I've used some ajax in other projects prior.
    – Miklr
    Commented Oct 11, 2012 at 12:42
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>
<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
</script>

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.

0

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.

Thanks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .