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
ksmoksmo 

success message after the update has been made and clear it

on the update button I have the below logic in apex class

          PageReference pageRef = Page.ITEM_VFPAGE;
            pageRef.setRedirect(true);
        
           pageref.getParameters().put('ShowMessage','1');
            return pageRef;

On the construcor
if(ApexPages.currentPage().getParameters().get('ShowMessage') != null)
         {
             ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Info, 'Record Successfully Updated.!'));
         } 
on the vf page I have the apex:pagemessge which displays the message on the vf page.

After the record is updated the message is displaying correctly, but if the user continues to make changes that message should go away. How to acheive this?