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
Sarath ChandraSarath Chandra 

You have uncommitted changes to this VisualForce page....

Hello Team,
Greetings,
I've created a class Employee with (empName,Salary,exp) and was trying to get the result in the VF page. 

public class ClassEmployee
{
    public string EmpName {set; get;}
    public Integer EmpSalary {set; get;}
    public Integer EmpExperience {set; get;} 
    public ClassEmployee()
    {
        EmpName = 'John';
        EmpSalary= 10000;
        EmpExperience = 2;
    }

}

<apex:page controller='ClassEmployee'>
    {!.EmpName}
    {!.EmpSalary}
    {!.EmpExperience}    
</apex:page>


As soon as i save and hit preview, i get the error 
"You have uncommitted changes to this VisualForce page. This preview will show the most recently committed version of this page, not your current changes." and the result of the preview is 

User-added image

User-added image

I would like suggestions on hot to get rid of the error. Not sure why the error keeps popping up even though the page is saved

 
abhi_sfdcabhi_sfdc
try this

<apex:page controller='ClassEmployee'>
    {!EmpName}
    {!EmpSalary}
    {!EmpExperience}    
</apex:page>
 
Sarath ChandraSarath Chandra
Hi Abhi,
Thanks for reposnding, 
I found the issue as soon as i posted the question here. :) .  And you are right, the additonal dot caused the issue
Also not sure what changed, but i got the result when i closed the console window and retried the preview.. :)




 
Sarath ChandraSarath Chandra
Is there a way to avoid the prompt "You have uncommitted changes to this VisualForce page. This preview will show the most recently committed version of this page, not your current changes." ?? 
Even though the VF page is saved, why would the prompt keeps cropping up? 
Yash RathodYash Rathod
Hi, 

I've created a Visualforce page which shows a basic Contact record using standard controller. Below is the code:


<apex:page standardController="Contact">
    <apex:pageBlock title="COntact Summary">
        <apex:pageBlockSection>
            $A.get("e.force:navigateToURL").setParams(
    {"url": "/apex/pageName?&id=0037F000007xdK4QAI"}).fire();
            First Name: {! Contact.FirstName} <br/>
            Last Name: {! Contact.LastName} <br/>
            Contact Owner's Email: {! Contact.Owner.Email} <br/>
        </apex:pageBlockSection>
    </apex:pageBlock >
</apex:page>


But, when preview it after saving, everytime it prompts " PAGE NOT SAVED. You have uncommitted changes to this VisualForce page. This preview will show the most recently committed version of this page, not your current changes." Also the preview page is blank. 

I would like to know what is missing here. I am not able to solve it.
itsik edri 1itsik edri 1
In my case
I had to close some tabs of classes and triggers in the console
and move to another tab from "logs" to "problems"
all of the above are processes that running on the cloud 
so it make everything slower
And then i loged out and loged in again 
I don't see the message again!!!
hope it will help