Skip to main content
Apparently apex is needed to build a process to mass delete 'Paused and Waiting Interviews' since I am recieiving this error when I try to run the flow I ceeated:Too many DML rows: 10001. Anyone know what exact code I would need/have a step by step guide on building an apex?
1 respuesta
  1. 28 may 2019, 18:25
    pass object from process builder to apex-:

     

    replace sobject in below code with your custom object name

     

    public class DefaultEntitlementAction

     

    {

     

    @InvocableMethod(label='Update Object' description='Update object')

     

    public static void updateField( List<Sobject> listObject) {

     

    List<Sobject> listofObject=new List<Sobject>();

     

    for( Sobject obj1:listObject)

     

    {

     

        if(obj1.FieldA!=null)

     

           update here

     

        else

     

          update here

     

    Add items to list

     

    listofObject.add(obj1);

     

    }

     

    //update the list out of loop

     

    update listofObject;

     

    }

     

    }

     

    i dont know your object and field name , therefore i have used dummy object and field names. let me know if you are still facing issues
0/9000