You need to sign in to do that
Don't have an account?
refresh visualforce page and clear all data
I have a visualforce page with some input fields. The page has a save button that inserts the data into salesforce. here is the code for the save button.
insert olListF; PageReference pageRef = new PageReference('/apex/rma_addLineItems?orid=' + o.id); return pageRef;
/apex/rma_addLineItems?orid=' + o.id is the current input page.
I want the page to return to the exact same page and remove any fields that had been put in. The idea behind the page is it will allow someone to input 5 items and then either save them and move on or save them and add 5 more. It is the add 5 more option that is not working. It refreshes the page with the fields already filled out. Any ideas on how to accomplish my goal?
add this line before return statement
pageRef.setRedirect(true);
All Answers
add this line before return statement
pageRef.setRedirect(true);
Thanks that did it.