function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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?
SabrentSabrent
 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);