You need to sign in to do that
Don't have an account?
trmp
Give Community User Access to Case he/she Created when Case is Reassigned Using Assignment Rules
We have a community where community users can open cases. We are inserting the case via Apex which changes the owner due to using the default case assignment rule:
Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []
Here's a snippet of adding the CaseShare record. We've tried this in the above class marked as "without sharing", in a future method from a trigger, with and without also adding an AccountShare record.
Database.DMLOptions dmo = new Database.DMLOptions(); dmo.assignmentRuleHeader.useDefaultRule= true; dmo.EmailHeader.triggerAutoResponseEmail = false; caseRecord.setOptions(dmo); insert caseRecord;Without adding a CaseShare record, the community user will no longer be able to access the newly created case. However, when inserting the CaseShare record, we cannot get around this error:
Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []
Here's a snippet of adding the CaseShare record. We've tried this in the above class marked as "without sharing", in a future method from a trigger, with and without also adding an AccountShare record.
insert new CaseShare( CaseAccessLevel = 'Read', CaseId = c.Id, UserOrGroupId = c.CreatedById );Any help would be much appreciated.
http://docs.releasenotes.salesforce.com/en-us/winter14/release-notes/networks_setting_light_users.htm
All Answers
http://docs.releasenotes.salesforce.com/en-us/winter14/release-notes/networks_setting_light_users.htm