• Kieran Harrison
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies

Hi Guys, 

Just wondering if it is possible to create a trigger whereby everytime a Lead is converted and the user is creating a NEW Account and NEW Opportunity (not converting to an existing Account) that the trigger scans all existing Accounts (org-wide) before the records are created and looks for possible matches on the Date of Birth, Name, and Email fields used on the Lead. 

Essentially the spec is; 

  • User is trying to convert a Lead 
  • User is selecting to create a new Account and Opportunity
  • Trigger scans all existing Accounts for matches on the Date of Birth, Name and Email fields
  • Trigger returns a warning when matches are found

Field API names - 

 

  • Name 
  • Date_of_Birth__pc
  • PersonEmail
Hi Guys,

I need help writing an Apex Trigger, please. I currently have a validation rule in place which does not allow the user to move forward in Opportunity stage unless they have ticked a checkbox, however, I want to add to this rule so that they cannot move forward in stage unless they upload a customer declaration PDF under 'Files' as well as ticking the checkbox. 

I have been made aware that this cannot be done using Validation Rules, however, must be done using an Apex Trigger on Opportunity. 

I have taken a stab in the dark at writing the trigger from looking at Youtube videos but admittedly have absolutely no clue what I'm doing;

User-added image

Any assistance is greatly appreciated.

Hi Guys, 

Just wondering if it is possible to create a trigger whereby everytime a Lead is converted and the user is creating a NEW Account and NEW Opportunity (not converting to an existing Account) that the trigger scans all existing Accounts (org-wide) before the records are created and looks for possible matches on the Date of Birth, Name, and Email fields used on the Lead. 

Essentially the spec is; 

  • User is trying to convert a Lead 
  • User is selecting to create a new Account and Opportunity
  • Trigger scans all existing Accounts for matches on the Date of Birth, Name and Email fields
  • Trigger returns a warning when matches are found

Field API names - 

 

  • Name 
  • Date_of_Birth__pc
  • PersonEmail
Hi Guys,

I need help writing an Apex Trigger, please. I currently have a validation rule in place which does not allow the user to move forward in Opportunity stage unless they have ticked a checkbox, however, I want to add to this rule so that they cannot move forward in stage unless they upload a customer declaration PDF under 'Files' as well as ticking the checkbox. 

I have been made aware that this cannot be done using Validation Rules, however, must be done using an Apex Trigger on Opportunity. 

I have taken a stab in the dark at writing the trigger from looking at Youtube videos but admittedly have absolutely no clue what I'm doing;

User-added image

Any assistance is greatly appreciated.