• v j
  • NEWBIE
  • 0 Points
  • Member since 2014
  • SSE
  • persistent

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
Hi I am trying to create Auto User Sharing Rule , Which will share a public group with public group the above object fits for the requirement .But not able to use it since on using getting Compile Error.
Code in Apex class :
UserMembershipSharingRule oUserMembershipSharingRule =new UserMembershipSharingRule();
UserMembershipSharingRule.GroupId= spaceid; //spaceid is the public groupid
UserMembershipSharingRule.UserOrGroupId= spaceid;
UserMembershipSharingRule.UserAccessLevel = 'Read';

Error: Compile Error: No access to entity: UserMembershipSharingRule at line 1 column 8 "
 
  • December 19, 2014
  • Like
  • 0
Needed info on creating User Sharing Rule .In my code trigger written after insert on custom objects record which creates public group and shares that record in that group. Now i wanted to write a User sharing rule for same public group. I am not able to do that.
 
  • December 09, 2014
  • Like
  • 0
Needed info on creating User Sharing Rule .In my code trigger written after insert on custom objects record which creates public group and shares that record in that group. Now i wanted to write a User sharing rule for same public group. I am not able to do that.
 
  • December 09, 2014
  • Like
  • 0
I tried to create folder via apex code
      
      code:

        Folder fold=new Folder();
        fold.AccessType='Shared';
        fold.DeveloperName=UserInfo.getUserName();
        fold.AccessType='Shared';
        fold.Name='testfolder';
        fold.Type='Report';
        insert fold;

i got the error dml not allowed on folder.