• Daniel Dlugos
  • NEWBIE
  • 10 Points
  • Member since 2015
  • Salesforce Admin
  • CGI


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

I just created a salesforce developer org per the instructions and connect to trailhead but locate the Einstein Predition Builder in Setup.  I also see the following message under Einstein in setup: 

Einstein.ai Key Management Welcome to the Einstein.ai Key Management page. To connect to the service, click the link in your welcome email or contact support. 

Any guidance to resolve is appreciated!  I've tried logging out and back in, creating a second developer org and neither resolved the issue.
I am working on the LEX Rollout Specialist superbadge, and I am unable to validate step #6. Here is the error I am getting:
User-added image

I began the superbadge by creating a new trailhead playground, and I have not had any problems completeing the first 5 steps. How do I resolve this problem?
I'm just learning the basics of Apex, and I could use a little help writing a test class for a basic trigger I have that prevents users from deleting tasks. I've been at this for over a week now, and I've just hit a wall with it.

Could anyone help me out with a test class for this? I'll be sure to make it best answer :)

Thanks in advance.
trigger NoDeleteOnTask on Task (before delete)
{
   
    if(trigger.isDelete){
        Set<Id> allowedProfileIds = new Set<Id>();
        for(Profile p :[SELECT Id FROM Profile WHERE (Name = 'System Administrator' )]){
            allowedProfileIds.add(p.Id);
        }

        for (Task a : Trigger.old){
            if(!allowedProfileIds.contains(UserInfo.getProfileId())){
                a.addError('Task\'s can\'t be deleted. Please contact the system administrator if you require further assistance.');
            }
        }
    }
}