• manic
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

Hi all.

 

Because Cases have private Org wide defaults and once created via Partner Portal get assigned to different users/queues we've created a manual sharing rule by using Apex utlizing CaseShare object. There is an exception being generated while doing insert caseShareList. Error says: There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Apex trigger AllCaseTriggers caused an unexpected exception, contact your administrator: AllCaseTriggers: execution of AfterUpdate caused by: System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []: Class.CaseSharing.ShareCaseManually: line 19, column 9".

 

In api it says "Customer Portal users cannot access this object.". What does that mean exactly? That SFDC prevents insertion of CaseShare records even when doing it inside a class with no sharing specified?

 

Also, when I disable the insert shareCaseListLine, user in partner portal can see the case they have just created although org wide defaults are private and case has been reassigned to a queue via assignment rules?! Users accessing SFDC directly lose visibility of the case once saved unless sharing via code is enabled.

 

Thank you for your help,

 

Marko

  • May 04, 2011
  • Like
  • 0