You need to sign in to do that
Don't have an account?
h8r41d
Is there a way to override ownerid when inserting activity data for a portal session?
I have a client who has some code that automatically adds a notes task when a case is closed. It works fine except when a portal user closes their case, then I get this error:
First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Portal user can't own an activity: []
Is there a way to get around this issue and still insert an activity record when running as a PU? Can I override the user session limitations and add records as a system admin in the class?
You can display that object as a vf page and create a custom save method which assigns the owner id of your choosing.
You can create a trigger on Task and Event objects: