• Mary Anu 8
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
In org , I'm not able to see the login button suddenly eventhough "Admin can login as any user" checkbox is enabled ? what might be the reason.
For system admin itself not working:
code:Trigger:
if(trigger.isafter && trigger.isinsert)
    {
        User_Case__Share userCaseShare=new User_Case__Share();
        User_case__c newUC=[SELECT Id, OwnerId FROM User_Case__c where id =:trigger.new];
        handler.shareUserCaseRec(newUC.Id,newUC.OwnerId);
    }

Hanlder class:
public class USRetail_StatusTypeChangeHandler {

    public void shareUserCaseRec(ID recordIDUC,ID UserOrGroupIdUC)
    {
         User_Case__Share userCaseShare=new User_Case__Share();
        userCaseShare.ParentId=recordIDUC;
        //userCaseShare.RowCause='Manual';
        userCaseShare.UserOrGroupId=UserOrGroupIdUC;
        userCaseShare.AccessLevel='Edit';
        insert userCaseShare;
    }
}
In org , I'm not able to see the login button suddenly eventhough "Admin can login as any user" checkbox is enabled ? what might be the reason.