+ Start a Discussion
cprakashcprakash 

FIELD_INTEGRITY_EXCEPTION, Portal user can't own an activity:

Hi,

 

I am sending some email notification to admin and owner on case attachment.

 

This is working fine when a standard user does case attachment,but when a portal user does case attachment the following exception is throws:

 

AttachmentNotifier: execution of AfterInsert

caused by: System.EmailException: SendEmail failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Portal user can't own an activity: []

 

I am not getting what i am missing.

 

Regards,

Chandra

h8r41dh8r41d

I've got this problem. Anyone got a solution?

Donald Rivard.ax1922Donald Rivard.ax1922

anybody have an answer for this? I am attempting to send an email using Apex code / trigger and I get this error during the sendEmail.

UVUV
any luck on this?
RovRov
 when trying to deploy my project to production , a test class failed with this error. 
No idea why. 
Does anyone have an insight? please share. 
SCN Demo MOSCN Demo MO
you can use following method, this worked for me:
mail.setSaveAsActivity(false);