function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SanjaySSanjayS 

Custom Controller

When I creat a custom controller and the code experience an error, the codes are reverted back to last working code.

Do we have a setting for keeping the codes intact during error.

 

Best Answer chosen by Admin (Salesforce Developers) 
Rahul SharmaRahul Sharma

Mostly it happens if we code it using development mode or via browser. So, if we have any compile error while saving and we try to refresh the page, then code is reverted back to last working version(and all the changes are lost).

 

If you are not already using The Force.com IDE then I would suggest you to prefer coding from it rather than from browser.

All Answers

Rahul SharmaRahul Sharma

Mostly it happens if we code it using development mode or via browser. So, if we have any compile error while saving and we try to refresh the page, then code is reverted back to last working version(and all the changes are lost).

 

If you are not already using The Force.com IDE then I would suggest you to prefer coding from it rather than from browser.

This was selected as the best answer
SanjaySSanjayS

I believe you are right. I was using browser to write the codes.

Thanks.