You need to sign in to do that
Don't have an account?
Ananga Sen 13
ENTER button is not working in VF page.
issue:
While creating a New Opportunity, if user is pressing the “Enter” key, then the record is not getting save. Afer clicked on ENTER its redirecting to the opportunity list view page.
My expectation:
After all data entry in the new opportunity VF page if user click on ENTER button then the data should save and details page should open.
What is the issue on the VF page? Why ENTER button not working?
While creating a New Opportunity, if user is pressing the “Enter” key, then the record is not getting save. Afer clicked on ENTER its redirecting to the opportunity list view page.
My expectation:
After all data entry in the new opportunity VF page if user click on ENTER button then the data should save and details page should open.
What is the issue on the VF page? Why ENTER button not working?
Refer below document which has the solution for the same.
https://developer.secure.force.com/cookbook/recipe/submit-a-form-with-the-enter-key
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Sandhya
Juz try the below code in pageblockButtons
<apex:commandButton value="enter" action="{!save}"/>
You have to give action for your button . if you want customize more than this , then you should go for controller class . juz try the above code . if it s useful just mark it as correct answer.
thanks
suriya
You can try this code . It will help you definetly
<apex:commandButton value="Enter" action={!redirectspage}/>
In the controller
public pageReference redirectspage()
{
insert opp; // inserting the new opportunity record
pageReference pg = new pageReference('/'+opp.id);
pg.setRedirect(true);
return pg;
}
please mark it as Best Answer and solved.
Thanks
Sai harsha