• M Usama
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
I cannot complete the Subscribe to Platform Events challenge. When I click the 'Check Challenge' button I get the following error:

Publishing an Order_Event__e did not create the associated task successfully. Please check your trigger and event.

Here is my code:

trigger OrderEventTrigger on Order_Event__e (after insert) {
    // List to hold all tasks to be created.
    List<Task> tasks = new List<Task>();
    
    // Get queue Id for case owner
    String usr = UserInfo.getUserId(); 
        
       
    // Iterate through each notification.
    for (Order_Event__e event : Trigger.New) {
        if (event.Has_Shipped__c == true) {
            // Create Task to dispatch new team.
            Task t = new Task();
            t.Priority = 'Medium';
            t.Status = 'New';
            t.Subject = 'Follow up on shipped order' + event.Order_Number__c;
            t.OwnerId = Usr;
            tasks.add(t);
        }
   }
    
    // Insert all tasks corresponding to events received.
    insert tasks;
}

Please assist. Thanks. 
I keep getting the following error when trying to check my challenge on "Routing Records with Approvals" on Admin Trail - Intermediate.

Challenge not yet complete... here's what's wrong: 
The process did not set the correct Type value on submitting for approval

User-added image

I'm not sure why it isn't approving.  Please help!

User-added image
User-added image
User-added image
User-added image




 
I am working on a Trailhead Challenge and receive this error when I execute.

User-added image

Create an Apex class that returns contacts based on incoming parameters.

For this challenge, you will need to create a class that has a method accepting two strings. The method searches for contacts that have a last name matching the first string and a mailing postal code (API name: MailingPostalCode) matching the second. It gets the ID and Name of those contacts and returns them.The Apex class must be called 'ContactSearch' and be in the public scope.
The Apex class must have a public static method called 'searchForContacts'.
The 'searchForContacts' method must accept two incoming strings as parameters, find any contact that has a last name matching the first, and mailing postal code matching the second string. The method should return a list of Contact records with at least the ID and Name fields.
The return type for 'searchForContacts' must be 'List<Contact>'.

Here's my code:

User-added image

Can someone assist me? Please.

Thank you,
Darren