Jump to content
  • 0

Triggered action to send email issues


Question

I am trying to create a triggered action with notifies a group of users in the AuthUsers table when the record meets certain criteria. I use it successfully in other tables but it is choking here for some reason and saying it expects a single value. Any thoughts on why or how to get around that?  I have trimmed down just the relevant code (hopefully) to save space as it has a lot of variables for populating the email message.

image.png.c9ab0fcecf3df904f3d0c07ee84b262b.png

image.png.742eced07404dccd4fabbe93d5d5768a.png

 

As a reference, I use something very similar, just without the If/Then in another table and it runs without issue.

image.png.aa532d5d500f0f12cc04ae4ea94f77da.png

Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Hello @NickO,

I believe you may use another approach for this Trigger. It is better to avoid using the If-Then block when you can use the Select statement instead. 

Could you test the Trigger design like this?
rCRFani.png

So, you may add the Select statement by clicking the Gear icon and select the record from the #inserted table that met the criteria.

If the criteria are met the email for a group of users is send. 

Feel free to update this thread in case you have additional questions. 

Link to post
Share on other sites
  • 0

Hi @CoopperBackpack, thanks for the suggestion. This does clear the error in the Triggered Actions builder, but I get a much less helpful "Record cannot be saved because an error was encountered in Triggered Actions." I stripped it down to just the email (changing the message to a generic text for testing). I am not sure if it makes a difference because the #inserted should deal only with the record being inserted, but this is a pretty big table the record is being added to. I also tried to add the "Top 1" condition to the select statement at the top and got the same error. Wish it was more descript about what is failing. I also tested it with Marketing Produced set to unchecked/false to see if it would just add that record. I got the same error. 

 

image.png.7d23c8ddb3f61742c20cfb36db6b2a29.png

Link to post
Share on other sites
  • 0

Hi @NickO,

I tested the Trigger in my account and it works properly. I received email when I added the new  record where the value is True in the MarketingProduced field. 
As far as I know this error 
"Record cannot be saved because an error was encountered in Triggered Actions" should be related to the data in the table. 

Do you have Formula field or unique field in the table with the Trigger?

 

Link to post
Share on other sites
  • 0

@CoopperBackpack and @NiceDuck thanks for the replies and sorry for the delayed response. I had to dip out for a few days and am sort of back now. Long story short, no unique fields or formula fields. Nothing out of the ordinary from what I can tell. All that said, I started a new triggered action from scratch, exact same as the others (using the WHERE clause to ID which records to trigger the email alert as CoopperBackback suggested) and it works fine. IDK why the other one was choking, but it's good to go now.

Link to post
Share on other sites
  • 0

For what it's worth, I had this same issue with the same error message on a trigger a few days ago. I couldn't figure out the issue and neither could support. Recreating from scratch fixed it. I think there is just a bug in the trigger designer at the moment. 

Link to post
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...
×
×
  • Create New...