+ Start a Discussion

Idle Session timeout

I am trying to set our application session time out to exactly one hour. I have already set the Session Timeout value to 1 hour in Session Settings. Is there a way to enforce exactly 1 hour timeout instead of the the way SF calculates session timeout (as below) ?

"The last active session time value isn’t updated until halfway through the timeout period. That is, if you have a 30 minute timeout, the system won’t check for activity until 15 minutes have passed. For example, assume you have a 30 minute timeout value. If you update a record after 10 minutes, the last active session time value won’t be updated because there was no activity after 15 minutes. You’ll be logged out in 20 more minutes (30 minutes total) because the last active session time wasn’t updated. Suppose you update a record after 20 minutes. That’s five minutes after the last active session time is checked, so your timeout resets and you have another 30 minutes before being logged out, for a total of 50 minutes."
I don't think you'll be able to achieve this - you'd only be able to take action after a period of time via Visualforce and JavaScript I think, which isn't available for every page (e.g. reports and dashboards), and you wouldn't be able to tell if the user did something that didn't refresh the part of the page containing the Visualforce (i.e. if they inline edited).  I reckon you'll need to do this outside of Salesforce - e.g, Lastpass has this kind of functionality (logout after a specific period of idle time) and there may be browser plugins that have this too.
Hi Bob, Quick question around this topic. Does the session logout time is reset after page refresh or do we need to really save a record(commit to database)? I have some problem once we migrate to lightning environment. I'm in a VF page I constantly active in that page (edit & save) however, I get logged out considering inactive. This was working perfectly fine in Salesforce Classic. Any idea if you can share would be highly appreciated.