0

I have a requirement where I need to remember the state of Visual page. This is required for example in case of governor limit.

Can we do this with static JS or is there any JS API available?

3
  • what state you want to track?
    – Allen Li
    Commented Apr 9, 2015 at 1:40
  • I want the page to remember its state in the event of a failure, including governor limit type errors. Commented Apr 9, 2015 at 4:29
  • You can do this with plain old JavaScript. It's not terribly difficult.
    – sfdcfox
    Commented Apr 9, 2015 at 6:26

1 Answer 1

0

If the error is caused by governor limit in apex code, you can catch it by following code: try{ ... } catch(LimitException){ ... }; If the error is caused by visualforce page limit(e.g., ViewState limit.), there is no good way to catch exception. But you can avoid govern limit by salesforce best-practice code.

2
  • Sorry, you can't catch LimitException. I only wish it worked that way.
    – sfdcfox
    Commented Apr 9, 2015 at 6:00
  • You are right, i checked doc again and it can't be caught.
    – Allen Li
    Commented Apr 9, 2015 at 6:10

You must log in to answer this question.

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