Skip to main content
Hi All,

    Please guide me where I am going wrong. I have created Apex Class as mentioned in the Trailhead module and created Process builder as mentioned. But when I change the Campaign record status to complete, it is throwing an error message below:

here was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Update failed. First exception on row 0 with id 7017F0000013KBxQAM; first error: CANNOT_EXECUTE_FLOW_TRIGGER, We can't save this record because the “Completed Class Sessions” process failed. Give your Salesforce admin these details. <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Error ID: 886669657-104344 (154217274): []

I have debugged some logs and came to know that I am getting query Exception as "System.QueryException: List has no rows for assignment to SObject".

This is the query in the Apex class, which is throwing that exception:

 

WorkBadgeDefinition workBadgeDef = new WorkBadgeDefinition();

    workBadgeDef = [SELECT Id,Name FROM WorkBadgeDefinition WHERE Name = :request.badgeName Limit 1];

This is link to the project:

https://trailhead.salesforce.com/content/learn/projects/workshop_mgmt/workshop_mgmt_apex

Please let me know what step I am missing in the above project to complete this project.

Thanks in advance

Sreenivas
2 answers
  1. May 7, 2020, 12:54 PM
    Hi Sreenivas, 

    I hope you are not still stuck with this one. I was, and I just found out that there is a typo in the GiveWorkThanksAction class: the type of the FeedItem Post was wrongly created as "post.Type = 'RypplePost', instead of "RipplePost".

    If you go top the Developer Console,  GiveWorkThanksAction class, search for RypplePost and replace with RipplePost, all works.

    Good luck and I hope you get your badge! :-)