{"id":11018,"date":"2025-06-25T12:03:37","date_gmt":"2025-06-25T12:03:37","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/salesforce\/?p=11018"},"modified":"2025-09-05T04:15:02","modified_gmt":"2025-09-05T04:15:02","slug":"salesforce-lightning-deep-dive-custom-url-buttons-for-easy-record-creation-with-specific-record-types-and-default-field-values","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/salesforce\/2025\/06\/25\/salesforce-lightning-deep-dive-custom-url-buttons-for-easy-record-creation-with-specific-record-types-and-default-field-values\/","title":{"rendered":"Create Salesforce Records with Predefined Fields Using Custom Buttons"},"content":{"rendered":"\n<p>In Salesforce, required fields serve a critical role in maintaining data quality and enforcing business rules. But what happens when users don\u2019t want to see or interact with those required fields on the page layout?<\/p>\n\n\n\n<p>Fortunately, Salesforce provides a clever workaround using custom URL buttons or links. With this approach, you can bypass the manual input while still meeting validation rules and ensuring all required data is captured.<\/p>\n\n\n\n<p>To understand this better, let\u2019s walk through a practical use case that demonstrates how to implement Custom URL Buttons or Links in Salesforce.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Use Case: Quick creation of case with &#8216;Default&#8217; Record Type from Contact<\/mark><\/strong><\/h2>\n\n\n\n<p>Support agents need to create a Case directly from a Contact record, and the following should happen automatically:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Case Origin<\/strong> should be set to &#8220;Phone&#8221;<\/li>\n\n\n\n<li><strong>Priority <\/strong>should be set to &#8220;Medium&#8221;<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">The Solution to the use case: Create Custom URL Button with Field Defaults<\/mark><\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>Create a Custom Button or Link on Contact\n<ul class=\"wp-block-list\">\n<li>Setup \u2192 Object Manager \u2192 Contact<\/li>\n\n\n\n<li>Click on Buttons, Links, and Actions<\/li>\n\n\n\n<li>Click New Button or Link and select List Button, fill the URL.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/06\/Create-Button.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/06\/Create-Button.png\" alt=\"Creating Button\"><\/a><\/center><font size=\"2\"><center><i> Creating Button <\/i><\/center><\/font>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>To find the correct recordTypeId for the Case you wish to use, follow these steps:\n<ul class=\"wp-block-list\">\n<li>Navigate to Setup<\/li>\n\n\n\n<li>Navigate to Object Manager \u2192 Case \u2192 Record Types<\/li>\n\n\n\n<li>Click on the desired Record Type<\/li>\n\n\n\n<li>In the browser\u2019s address bar, locate the ID at the end of the URL this is your record TypeId.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/06\/RecordType-Id.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/06\/RecordType-Id.png\" alt=\"Creating Record Type\"><\/a><\/center><font size=\"2\"><center><i> Creating Record Type <\/i><\/center><\/font>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Add the Custom Link\/Button to the Contact List View\n<ul class=\"wp-block-list\">\n<li>Navigate to Setup \u2192 Object Manager \u2192 Contact<\/li>\n\n\n\n<li>Find and edit the List View layout.<\/li>\n\n\n\n<li>Under Listview Buttons, add your custom button to the Selected Buttons section.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/06\/Add-button-on-list-view.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/06\/Add-button-on-list-view.png\" alt=\"Add button on the List View\"><\/a><\/center><font size=\"2\"><center><i>Add button on the List View<\/i><\/center><\/font>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click Save. Now you can see the button on Contact List View.<\/li>\n<\/ul>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/06\/Create-Case-button.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/06\/Create-Case-button.png\" alt=\"Create Case button\"><\/a><\/center><font size=\"2\"><center><i> Create Case button <\/i><\/center><\/font>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click the &#8220;Create Case&#8221; button&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>This will automatically populate the Case fields: Origin set to &#8220;Phone&#8221; and&nbsp;Priority set to &#8220;Medium&#8221; and case record type as specified ie. <strong>Default case<\/strong>&nbsp; as shown in below image:<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/06\/New-Case-Created.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2025\/06\/New-Case-Created.png\" alt=\"New Case Created\"><\/a><\/center><font size=\"2\"><center><i> New Case Created <\/i><\/center><\/font>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Conclusion<\/mark><\/strong><\/h2>\n\n\n\n<p>The example above illustrates how custom buttons or links can be used with standard Salesforce objects to meet specific requirements by populating field values.<br>This same approach can also be applied to custom objects<strong>, <\/strong>allowing you to specify custom fields in the URL to achieve similar functionality.<\/p>\n\n\n\n<p>By following the above blog instructions, you will be able to learn \u201c<strong><em>Create Salesforce Records with Predefined Fields Using Custom Buttons<\/em><\/strong>\u201d. If you still have queries or any related problems, don\u2019t hesitate to contact us at <a href=\"mailto:salesforce@greytrix.com\" target=\"_blank\" rel=\"noreferrer noopener\">salesforce@greytrix.com<\/a>. More details about the Product are available on <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/implementation-consulting-partner\/\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/integration\/\" target=\"_blank\" rel=\"noreferrer noopener\">our website<\/a> and <a href=\"https:\/\/appexchange.salesforce.com\/listingDetail?listingId=a0N30000000psM5EAI\" target=\"_blank\" rel=\"noreferrer noopener\">Salesforce AppExchange<\/a>. <\/p>\n\n\n\n<p>We hope you may find this blog resourceful and helpful. However, if you still have concerns and need more help, please contact us at <a href=\"mailto:salesforce@greytrix.com\" target=\"_blank\" rel=\"noreferrer noopener\">salesforce@greytrix.com<\/a>.<\/p>\n\n\n\n<p style=\"text-align: justify\"><b>About Us<\/b><\/br>\n<p><a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a> \u2013 a globally recognized and one of the oldest Sage Development Partner and a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners and Sage PSG across the globe. We offer Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that require apex code incorporation into the Salesforce platform.<br><br> Greytrix has some unique solutions for Cloud CRM such as <a href=\"\">Salesforce Sage integration<\/a> for <a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/integration\/\">Sage X3<\/a>, <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/sage-100-integration\/\">Sage 100<\/a> and <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/sage-300-integration\/\">Sage 300 (Sage Accpac)<\/a>. We also offer best-in-class Cloud CRM <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/crm-development\/\">Salesforce customization and development services<\/a> along with services such as Salesforce <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/data-migration-support\/\">Data Migration<\/a>, <a href=\"https:\/\/www.greytrix.com\/salesforce-cloud-services\/crm-development\/\">Integrated App development<\/a>, Custom App development and Technical Support business partners and end users. Salesforce Cloud CRM integration offered by Greytrix works with Lightning web components and supports standard opportunity workflow. Greytrix GUMU&#x2122; integration for Sage ERP \u2013 Salesforce is a 5-star rated app listed on <a href=\"https:\/\/appexchange.salesforce.com\/appxListingDetail?listingId=a0N30000000psM5EAI\" target=\"_blank\" rel=\"noopener\">Salesforce AppExchange<\/a>.<br> The GUMU&#x2122; Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.<br><br> For more information on our Salesforce products and services, contact us at <a href=\"mailto:salesforce@greytrix.com\">salesforce@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n\n\n\n<p><strong>Related Posts<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/09\/24\/create-button-for-list-view\/\" target=\"_blank\" rel=\"noreferrer noopener\">Create Button for List View<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2022\/02\/24\/how-to-create-quick-action-button-using-lightning-web-component\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Create Quick action button using lightning web component<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In Salesforce, required fields serve a critical role in maintaining data quality and enforcing business rules. But what happens when users don\u2019t want to see or interact with those required fields on the page layout? Fortunately, Salesforce provides a clever workaround using custom URL buttons or links. With this approach, you can bypass the manual\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2025\/06\/25\/salesforce-lightning-deep-dive-custom-url-buttons-for-easy-record-creation-with-specific-record-types-and-default-field-values\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[600,601,65,958,2109,2157,2124,2125,1710,2112,2107,220,2110,416,2108,2111],"class_list":["post-11018","post","type-post","status-publish","format-standard","hentry","category-salesforce-srv","tag-button-for-list-view","tag-create-custom-button","tag-custom-button","tag-custom-button-in-salesforce","tag-custom-links","tag-custom-url-button","tag-custom-url-buttons","tag-default-field-values","tag-gumusalesforce","tag-lightningexperience","tag-lightningrecordpage","tag-list-view","tag-recordtype","tag-salesforce-technical","tag-salesforceadmin","tag-salesforceautomation"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/11018","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/comments?post=11018"}],"version-history":[{"count":8,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/11018\/revisions"}],"predecessor-version":[{"id":11158,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/11018\/revisions\/11158"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/media?parent=11018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/categories?post=11018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/tags?post=11018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}