+ Start a Discussion

I am trying to solve challenge for bulk trigger and getting error like:

I am trying to solve challange in bulktrigger and getting error like: 
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 30128000000FSzm. Flow error messages: An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.: []

I am using below code lines: 

trigger ClosedOpportunityTrigger on Opportunity (after insert, after update) {

    List<Task> taskList = new List<Task>();
    for (Opportunity opp : [SELECT Id, StageName FROM Opportunity WHERE StageName = 'Closed Won' AND Id IN :Trigger.new]){
            taskList.add(new Task(Subject = 'Follow Up Test Task',
                                  WhatId = opp.Id));

        insert taskList;

Amit Chaudhary 8Amit Chaudhary 8
Look like some issue is coming due to process builder. Please create a new playground and test same code there