{"id":177,"date":"2013-12-07T07:09:22","date_gmt":"2013-12-07T07:09:22","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/salesforce\/?p=177"},"modified":"2025-05-15T09:26:22","modified_gmt":"2025-05-15T09:26:22","slug":"set-the-click-event-on-enter-in-visualforce-page","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/salesforce\/2013\/12\/07\/set-the-click-event-on-enter-in-visualforce-page\/","title":{"rendered":"Set the click event of button on Enter in Visualforce page"},"content":{"rendered":"<p style=\"text-align: justify;\">Sometime ago we had a client requirement wherein we had to perform a button click operation when the user presses the enter button on a visual force page. In a normal visualforce page, there is no specific way to define a button to be pressed while pressing the enter key.<\/p>\n<p><span style=\"color: #000000;\"><em><strong>New Stuff<\/strong><\/em>:\u00a0\u00a0<\/span><a title=\"SOQL Query on combination of two fields\" href=\"http:\/\/www.greytrix.com\/blogs\/salesforce\/2013\/11\/21\/soql-query-on-combination-of-two-fields\/\" target=\"_blank\" rel=\"noopener\">SOQL Query on combination of two fields<\/a><\/p>\n<p style=\"text-align: justify;\">In our visualforce page, we wanted to perform the click of \u201cSave\u201d button whenever the user presses the enter key. In order to trigger this action we have used the following code \u2013<a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2013\/12\/btn1.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-178\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2013\/12\/btn1.jpg\" alt=\"btn1\" width=\"724\" height=\"324\" \/><\/a>By including the above code in the visualforce page, one can set the event to be used on the enter button .<\/p>\n<p><span style=\"font-size: Medium;\"><strong>About Us<\/strong><\/span><br \/>\n<a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a> as a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners across the globe. We offers Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that requires apex code incorporation into the Salesforce platform.<\/p>\n<p><a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a> has some unique solutions for Cloud CRM such as Salesforce integration with <a href=\"https:\/\/www.greytrix.com\/product\/sage-x3\/gumu-x3-salesforce-integration\">Sage Enterprise Management (Sage X3<\/a>), Sage Intacct, <a href=\"https:\/\/www.greytrix.com\/product\/sage-100-erp\/gumu-100-salesforce-integration\">Sage 100 <\/a>and <a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp\/gumu-300-salesforce-integration\">Sage 300 (Sage Accpac)<\/a>. We also offer best-in-class Cloud CRM <a href=\"https:\/\/www.greytrix.com\/product\/crm-development\/salesforce-com\">Salesforce customization and development services<\/a> along with services such as Salesforce <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/data-migration-services\">Data Migration<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/integrated-application-development\">Integrated App development<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/custom-development\">Custom App development<\/a> and <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/maintenance-support\">Technical Support<\/a> to business partners and end users.<\/p>\n<p>Greytrix GUMU&#x2122; integration for Sage ERP \u2013 Salesforce is a 5-star app listed on <a href=\"https:\/\/appexchange.salesforce.com\/listingDetail?listingId=a0N30000000psM5EAI\" target=\"_blank\" rel=\"noopener\">Salesforce AppExchange<\/a>.<\/p>\n<p>For more information, please contact us at <a href=\"mailto:salesforce@greytrix.com\">salesforce@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n<p><strong><span style=\"font-size: Medium;\">Related Posts<\/span><\/strong><\/p>\n<ul>\n<li><a title=\"Excel Export in Salesforce\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2013\/11\/19\/excel-export-in-salesforce\/\" target=\"_blank\" rel=\"noopener\">Excel Export\u00a0in Salesforce<\/a><\/li>\n<li><a title=\"PDF Export in Salesforce\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2013\/11\/08\/pdf-export-in-salesforce\/\" target=\"_blank\" rel=\"noopener\">PDF Export in Salesforce\u00a0<\/a><\/li>\n<li><a title=\"Get Key Prefix\/Object id of Object in JavaScript\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2013\/11\/02\/get-key-prefixobject-id-of-object-in-javascript\/\" target=\"_blank\" rel=\"noopener\">Get Key Prefix\/Object id of Object in JavaScript<\/a><\/li>\n<li><a title=\"Mapping custom lead fields to standard contact fields\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2013\/11\/01\/mapping-custom-lead-fields-to-standard-contact-fields\/\" target=\"_blank\" rel=\"noopener\">Mapping custom lead fields to standard contact fields<\/a><\/li>\n<li><a title=\"Overriding standard visual page styling in Salesforce\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2013\/10\/23\/overriding-standard-visual-page-styling-in-salesforce\/\" target=\"_blank\" rel=\"noopener\">Overriding standard visual page styling in Salesforce<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Sometime ago we had a client requirement wherein we had to perform a button click operation when the user presses the enter button on a visual force page. In a normal visualforce page, there is no specific way to define a button to be pressed while pressing the enter key. New Stuff:\u00a0\u00a0SOQL Query on combination\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2013\/12\/07\/set-the-click-event-on-enter-in-visualforce-page\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[562,561,522],"class_list":["post-177","post","type-post","status-publish","format-standard","hentry","category-salesforce-srv","tag-code-in-visualforce-page","tag-event-of-button","tag-visualforce"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/comments?post=177"}],"version-history":[{"count":2,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/177\/revisions"}],"predecessor-version":[{"id":10750,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/177\/revisions\/10750"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/media?parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/categories?post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/tags?post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}