• Bryant Daniels 53
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hello was wondering if anyone is experiencing a issue when deploying Security Settings into a org. I receive the following message:
All Component Failures:
1.  settings/Security.settings -- Error: An unexpected error occurred. Please include this ErrorId if you contact support: 1561807314-628096 (-2122813023) 
Hello I am trying to update a Role on a user by using Apex currently doing this but receiving attempt to dereference null

UserRole ur = [SELECT Id FROM UserRole Where name = 'CEO'];
        Profile p  = [Select id from Profile where name = 'System Administrator'];
        User u = [Select userrole.id from User Where profileID =: p.id];
        system.debug('ur' + ur);
        system.debug('p' + p);
        system.debug('u' + u);
        
         u.userrole.id = ur.id; 
Hello I am trying to update a Role on a user by using Apex currently doing this but receiving attempt to dereference null

UserRole ur = [SELECT Id FROM UserRole Where name = 'CEO'];
        Profile p  = [Select id from Profile where name = 'System Administrator'];
        User u = [Select userrole.id from User Where profileID =: p.id];
        system.debug('ur' + ur);
        system.debug('p' + p);
        system.debug('u' + u);
        
         u.userrole.id = ur.id;