6

Is there a way to autosave a record that is created or opened for editing in salesforce ? In light of this feature not being available in salesforce my users are complaining about losing data even with a lengthy time out set. Simply put, they are entering extensive prose and during the course of a day are interrupted. Any way to add a parm to the url or other method ????

5 Answers 5

6

There's no real solution outside of "saving frequently," at least within salesforce.com itself. You could turn on the "timeout popup" box, so they can at least know they need to log back in before continuing. Also, you can increase the session time to the maximum, which should last for an entire work day worth of time. If your users are using Chrome or Firefox, they could use Lazarus: Form Recovery (a free addon) that can recover a form's content in the event of a session timeout.

2

Those types of url hacking are not supported by Salesforce, but are possible by raising a case. There are however security risks as a consequence of implementing them:

How can I allow "autosave by URL"?

0

Unfortunately, I'm pretty sure there's no way to do this just through the URL. I was thinking you might be able to get creative with javascript in a sidebar component, but it doesn't look like Save is available to $Action...

Your users may need to suck it up and learn to click save more often... :/

0

The best thing to do here is override edit page with VisualForce page and periodically save content to SF record.

Steps:

  1. override edit page with Visual Force page
  2. add JavaScript, something like this (jquery usage)

var cleared = false; $('input,select,textarea').on('change',function(){ if(cleared==false){ timeout = setTimeout(function(){ //autosave, VisualForce remoting function that saves changes //be careful to return id of record on first saving to save every other change to the same record cleared = false; },10000);
} cleared = true; });

This piece of code with call your autosave function every 10 second after changing something in input field.

0
  1. Add VF Page component to std. VF Page. Make the VF Page component's height to 1px so that it is not visible.

  2. Add a JS function (say AutoSave) in VF Component which calls Window.SetInterval every 5 sec or 10 sec or whatever interval you are looking for.

  3. Invoke a VFRemoting function within AutoSave function and pass all the TEXT input values to Apex controller(send it as an Obj). Update the record with new values via RemoteAction Apex function from the controller side.

Note: This solution is a long shot, meaning it takes longer to develop and hard to maintain. In my view, these kinds of problems are business process issues and not a technical issue.

You must log in to answer this question.

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