You need to sign in to do that
Don't have an account?
Lakshman
Outbound Email service context
Hi,
Does any one know the context of outbound email service. I am sending Single Email Message from customer portal to portal User's email. I want to update record whose ID is present in the email subject using Email service under some other user context.
Also if anyone knows if we can change context of user somehow w/o using scheduler please let me know.
Thanks!
-Lakshman
I'm not aware of any way to change the user context. Even things like @future etc know about the user that started it from the underlying trigger etc.
As in scheduler the the user context is the person who scheduled the Apex, so I am not sure if the same applies for Email Service class, what is the user context of Email Service class, do you know waht would be the user context if I write an outbound email service?
-Lakshman
Outbound email is sent from apex by the user that is executing the apex. Email services are for handling inbound email, so I don't think they come in to your scenario.
Yes you are right but I will be sending email to the EmailService addess which will be further handled to update object. So my question is what would be context when I receive an Inbound email received via EmailService address.
-Lakshman
Ah - I understand.
When you set up an email service you configure email addresses associated with it. The email address record has a context user, and the service assumes the permissions of that user so I'd expect that any changes would be made under the name of that user.
Alright then I would start developing that Email Service and will hope that it runs in the specified Context User.
Thanks for you help Bob!
-Lakshman
You can specify the user context for an inbound Email service. It's actually a pretty handy way to switch user context.
Dan