• ramesh infy
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I have written a test on invocable apex class used in process builder and its failed. plz find the below code and help me out where i am going wrong also atteched the error 

Error --
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, We can't save this record because the “Account Owner Change” 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.: []

code --
@isTest
public class RequestPortalRecordsTest {

    static testMethod void OwnerUpdateMethodTest() {
        Test.startTest();
        Food_Service_Bulk_Data_Processing_Limit__c c=new Food_Service_Bulk_Data_Processing_Limit__c();
        c.Name='Default';
        c.Batch_Size__c=200;
        insert c;
        
          Account acc = new Account();
          acc.Name = 'TestAccount';
         acc.Rating='Active';
       insert acc;
       Request_Portal__c rp = new Request_Portal__c ();
        rp.Account_Name__c = acc.id;
        insert rp;
        //rpList.add(rp);
        List<Request_Portal__c> rpList = new List<Request_Portal__c> ();
        RequestPortalRecords.ReqChange(rpList);
         Test.stopTest();
         //  public static void ReqChange(List<Request_Portal__c> rp)
        
    }
}