Business case: send email when job is released for part that has a certain checkbox checked in the part record.
I created a Data Directive with an in transaction condition to enable a standard directive to send the email.
It tested fine and worked as expected. (when only testing one job release at a time) Put into ‘production’ and someone released 60 + jobs at one time. a email was sent containing all 60 + job numbers and all 60 + part numbers
how can I only send the data from the applicable ttJobHead row, not from all rows
I’m not positive, but the asynchronous setting might change your result. I usually set it to synchronous.
Can I see the conditions you set?
I’m guessing the in-transaction piece is working, but when it goes to Standard DD its querying all the jobs. You can use some code to build the Send Email into the In-Transaction BPM and test it out.
var mailer = this.GetMailer(async: false);
var message = new Ice.Mail.SmtpMail();
message.To.Add(“ToEmail@email.com”);
message.SetFrom(“FromEmail@email.com”);
message.SetSubject(“Subject Text”);
message.SetBody(“Body Text”);
mailer.Send(message);
1 Like
I used a custom code block instead of the send email widget and think it is working…
AHH i’m sorry I thought i was on my thread