• RP Singh
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
1. Signup for a Developer edition org(Org1)
2. Create a custom REST endpoint to accept a JSON with below information:
FirstName
LastName
Phone
Email
Company
3. The above webservice should accept the request, parse the request and check if  
there is a lead already existing in the system with same details.
1. If exists, it should send response saying lead already exists with same details  
and send Salesforce Id of the existing lead in the response.
2. If no lead exists with matching details, it should create a new lead with details  
received in the request and response should contain Salesforce Id of the new  
lead created.
3. Response should clearly say whether it is sending Salesforce Id of the new  
lead or Salesforce Id of the existing lead.
4. Signup for another Developer edition org(Org2)
5. Create a visualforce page or lightning aura component or lightning web component in  
Org2.
1. It should contain a form with below input fields:
Last Name
First Name
Phone
Email
2. There should be a “Create Lead” button below the form and when user clicks on this  
button, REST webservice call should be made to the endpoint in Org1 and response  
received should be displayed back to the user.  
3. Display spinner or status message to the user while Webservice is in progress.
1. Create a Formula Field named Domain on Contact Object, This should give me the Domain from Email Field on Contact Object. For Example: - If I save the Contact with Email as testuser@gmail.com, then formula field of Domain should have value “gmail”
2. Add a text Field at Account Level named as Contact Unique Domains
3. Create a trigger on Contact, Which handles Insert / Update / Delete / Undelete scenario. Trigger should get the Account Id from the Contact and then read all the related contacts from that Account and then Store the unique domains to the Account Level. For Example If I have below 3 contacts
Email - testuser1@gmail.com and Domain - gmail
Email - testuser2@yahoo.com and Domain as yahoo
Email - testuser3@gmail.com and Domain as gmail
So there are two unique domain gmail and yahoo, hence my Account text field will be populated with value gmail;yahoo
1. Create a Formula Field named Domain on Contact Object, This should give me the Domain from Email Field on Contact Object. For Example: - If I save the Contact with Email as testuser@gmail.com, then formula field of Domain should have value “gmail”
2. Add a text Field at Account Level named as Contact Unique Domains
3. Create a trigger on Contact, Which handles Insert / Update / Delete / Undelete scenario. Trigger should get the Account Id from the Contact and then read all the related contacts from that Account and then Store the unique domains to the Account Level. For Example If I have below 3 contacts
Email - testuser1@gmail.com and Domain - gmail
Email - testuser2@yahoo.com and Domain as yahoo
Email - testuser3@gmail.com and Domain as gmail
So there are two unique domain gmail and yahoo, hence my Account text field will be populated with value gmail;yahoo