Jump to content
  • 0

Trigger


Pingzinggolf
 Share

Question

I am trying to build a trigger and I am hitting a road block.

 When a record is inserted into the table... use the value for "#inserted.email" and look in another table called "CM_Contacts" and see if there is a record with that email address.

If there is a record send email to person A

If not then send email to person B

As the code stands now I am only getting the NOT found part even after I put a email address in from the CM_Contats table.

 

Capture.PNG

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
1 hour ago, Pingzinggolf said:

I am trying to build a trigger and I am hitting a road block.

 When a record is inserted into the table... use the value for "#inserted.email" and look in another table called "CM_Contacts" and see if there is a record with that email address.

If there is a record send email to person A

If not then send email to person B

As the code stands now I am only getting the NOT found part even after I put a email address in from the CM_Contats table.

 

Capture.PNG

Try this, basically check if the email exists in the email column of the other table, WHERE (email column of that table is equal to email column of #inserted)
image.png.a6706e0a9adc05e72d33eefaddc6ca38.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...