Data Directive to send an email only works for specific user

I created a data directive to email a copy of the Packer after either the Shipping Status changes to “Shipped”, or if the Tracking Number of an already shipped packer is changed.

Works fine if I’m the one that sets the packer to Shipped" or changes the tracking number. But nothing happens for any other user.

Thoughts on where to look?


Does it include customer information your data your working with and do you have the CRM module enabled?

Joshua Giese
Technology Solutions : CTO
Direct Phone: 920.593.8299
Office Phone: 920.437.6400 x342

It simply calls the AutoPrint (which is configured to send an Email) when the desired conditions are met. Some details below.

If I could display a message box in a data Directive, I’d remove the AutoPrint and just have it show a message for debugging.

Message Box in BPM:

this.PublishInfoMessage("My Message",
                    "Chris Title", "Chris Comments");

Also, I see it’s set to Company Specific - are you in the same company as your other intended users?

Do the intended users have rights to close the record?

1 Like

Since I’m still new to E10’s BPM interface, how exactly do I implement that code?

Replace the AutoPrint object with a “Execute Custom Code” ? Can I just put the ExecCustCode object between Condition0 and AutoPrint1 ?

Create a Custom Code object and enter the code (click the cod> link in the action bar)

Yes, you can insert the code into the chain. Note that since it’s synchronous, the events after that block wont occur until after you dismiss the message. As I recall, you CANNOT run the message box in a asynchronous context

Just making sure you saw these comments above:

I think if I wanted to track down the issue, I would separate all of my conditions into separate blocks, with a debug statement after each condition is met - this way you can tell what conditions aren’t being met (assuming you are firing the BPM at all - debug message at start could solve that)

I added a debug message between the Start and Condition 0, and another between Condition0 and the AutoPrint.

I get each message, and the email when I run it.

Now to see what others get…

Had another user do the thing that triggers the BPM. They saw both messages (one after Start and one after the Condition).

But no email was sent.

My guess is the issue is with AutoPrint, do you have other AutoPrint BPM’s that are working for other users?
I had a terrible time getting AutoPrint to work properly in 10.0. Most of my issues seemed to stem from needing to host the printer share on the app server and then making sure users had access to the printer share.

Try using this code instead of the automailer:

var mailer = this.GetMailer(async: true);
     var message = new Ice.Mail.SmtpMail();
     message.SetBody("<html><body><p>MyMessage Here</p></body></html>");
     Dictionary<string, string> attachments = new Dictionary<string, string>();
     attachments.Add("MyFirstAttachment", @"\\MyServer\myFolder\MyFile.pdf");
     mailer.Send(message, attachments);

Thanks goes to @josecgomez.trigemco for his code


Thanks Jose (via Chris)

I was trying to get something working fast by emailing via the AutoPrint. Probably harder to trouble shoot that than to just build the whole report in the body of email message.


This is likely a permissions issue CRM… Can the user that is NOT getting that emails open up this customer in Customer Entry? #Curious

We don’t have CRM. And when the user that normally creates the Packer runs it, no one gets an email. But when I create the packer, everyone does.

That doesn’t make a lick of sense… even if you use the custom code if the problem is with the underlying piping… it still won’t work.
Do you see any errors in the EventLog?

On which machine? The App Server, the DB server, or the client machine?

App Server

I see a few

Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask: User Account is not set to 'Allow Session Impersonation'

Do individual users need to have their “allow impersonate” set? I thought just the user setup for the SystemAgent.

Yes it should be for the system agent only… are you sure that’s set?