Skip to content

LWC to search for a Contact in database by name. and checks if the Contact exists or not. Green color's Toast message for searched contact and Red color's Toast message for not searched contact.

Notifications You must be signed in to change notification settings

s4SHIVam7/contactSearch_lwc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Contact Search LWC

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. A green-colored toast message is displayed for a found contact, while a red-colored toast message is displayed for an unfound contact.

Features

  • Search for a Contact by name.
  • Displays a toast message with the search result.

Installation

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:

  1. Clone this repository to your local machine:

    https://github.com/s4SHIVam7/contactSearch_lwc.git
    

Deployment

  1. To deploy the component to your Salesforce org using Salesforce CLI, run the following command:
sfdx force:source:deploy -p force-app/main/default
  1. Once deployed, add the component to your Lightning App or Lightning Record Page.

  2. Use the "Contact Search" component to search for Contacts by name.

Usage

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".

ScreenShot

  1. Main Component image

  2. Successful Output image

  3. Valid Error Output image

About

LWC to search for a Contact in database by name. and checks if the Contact exists or not. Green color's Toast message for searched contact and Red color's Toast message for not searched contact.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published