How it works...

We have overridden the standard New Account button with our custom "Search First Before You Create" Lightning Component called accountSearchBeforeCreate.

The custom functionality contained within the accountSearchBeforeCreate Lightning Component will be invoked whenever a user clicks on New from within an account list view, as shown in the following screenshot:

Once the "Search First Before You Create" Lightning Component is invoked, a search page is presented to the users that will allow them to enter a company name into a search textbox and click Search, as shown in the following screenshot:

In this example, we are searching for the company WidgetsXYZ, which does not exist as a record in our Salesforce CRM organization. In this scenario, the user is presented with a message No account records found, click on Create to create an account.... The user is also presented with a Create button that allows them to create the account record, as shown in the following screenshot:

Upon clicking the Create button, the user is presented with the standard account creation dialog. In addition to enforcing all existing validation rules, the New Account edit page is prepopulated with the company name that was used in the initial search results. In our example, WidgetsXYZ is already filled out in the Account Name field, as shown in the following screenshot:

Upon clicking on the Save button, the new account record is created as standard, as shown in the following screenshot:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset