function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Satish masimukkuSatish masimukku 

cannot execute flow trigger salesforce

Error:
Update failed. First exception on row 0 with id 00Q22000001F4nLEAS; 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 301220000000ZNe. Flow error messages: <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. Contact your administrator for help.: []


actual process is when i am trying convert a lead in custom convert.after convert lead ststus set as a Custom Converted. after that i need to set record lock. so i am trying to set record lock by using the process bulider and Approval process.in that process i got this issuse.please fix this issuse.

otherwaise tell me how to set record lock.i know 16th winteer release. but it was not suport for my org. because my org is 16th summer.
NagendraNagendra (Salesforce Developers) 
Hi Satish,

You might get this error if the SObject (that you're inserting ) has an active Process Builder that expects certain fields to have values and those field values are NOT supplied before inserting them.

Try to pack all the necessary fields for the SObject that are required by process builder. You don't need to deactivate the process builder.

If you have record types set for that SObject make sure you supply the appropriate record type while packing field values.

For more information please check here: Please mark this as best answer if the information helps.

Best Regards,
Nagendra.P
Shubham KherdeShubham Kherde
Hi all,
I am facing Too many SOQL queries: 101 error for following code but as per governor limit my SOQL Query is outside the for loop still getting this error and also showing following process builder error with this
 
 ( 09:59:49:020 EXCEPTION_THROWN [184]|System.DmlException: Upsert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, We can't save this record because the “Update Oppty Lookup RelatedTo Events 2 test” process failed. Give your Salesforce admin these details. This error occurred when the flow tried to update records: LIMIT_EXCEEDED: System.LimitException: Too many SOQL queries: 101. You can look up ExceptionCode values in the SOAP API Developer Guide. Error ID: 1987318438-82422 (-64273350): []   )
 
  Map<Id, Opportunity> oppdbmap = new Map<Id, Opportunity>(
            [select Id, Booked__c, Initial_Appt_Date_Time__c, Initial_Appt_Time__c,
                (select Id, Subject, ActivityDateTime from Events where What.Type = 'Opportunity' and ActivityDateTime != null and Subject != 'Cancelled Appointment' order by ActivityDateTime desc limit 1) 
             from Opportunity where Id in: oppevmap.keyset()]);

        // if an existing event is more recent than a new one, we will use an existing one
        for (Id oid: oppevmap.keyset()){
            Event etempnew = oppevmap.get(oid);
            Opportunity oppdb = oppdbmap.get(oid);
            Event etempdb = oppdb == null ? null : oppdb.Events == null ? null : oppdb.Events.isempty() ? null : oppdb.Events[0];
            if (etempdb != null && etempdb.ActivityDateTime != null){
                if (etempnew == null || etempnew.ActivityDateTime == null || etempdb.ActivityDateTime > etempnew.ActivityDateTime){
                    oppevmap.put(oid, etempdb);
                }
            }               
        }

would anyone know how I can fix?

Thanks,
Shubham Kherde