-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This Lightning Web Component (LWC) allows you to search for a Contact in your Salesforce database by name. It provides a simple interface to input the Contact's name and checks if the Contact exists. Green color's Toast message for searched contact and Red color's Toast message for not searched contact.
- Search for a Contact by name.
- Displays a toast message with the search result.
To use this component in your Salesforce org, you can deploy it using Salesforce CLI or Salesforce Extensions for Visual Studio Code. Here are the steps:
-
Clone this repository to your local machine:
https://github.com/s4SHIVam7/contactSearch_lwc.git
- To deploy the component to your Salesforce org using Salesforce CLI, run the following command:
sfdx force:source:deploy -p force-app/main/default
-
Once deployed, add the component to your Lightning App or Lightning Record Page.
-
Use the "Contact Search" component to search for Contacts by name.
Enter the Contact's name in the input field.
Click the "Search" button.
If the Contact is found, a success toast message will be displayed as "Contact Found In Database!".
If the Contact is not found, an error toast message will be displayed as "Contact Not Found In Database".
-
Main Component
-
Successful Output
-
Valid Error Output