• Kaaviya P 4
  • NEWBIE
  • 10 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies
what I did 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, We can't save this record because the “Opportunity Management” process failed. Give your Salesforce admin these details. This error occurred when the flow tried to create records: REQUIRED_FIELD_MISSING: Required fields are missing: [AccountId]. You can look up ExceptionCode values in the SOAP API Developer Guide. Error ID: 44701433-132908 (-667225970): []


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));
       
    }

    if(taskList.size()>0){
        
        insert taskList;
        
    }
    
}
what I did 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, We can't save this record because the “Opportunity Management” process failed. Give your Salesforce admin these details. This error occurred when the flow tried to create records: REQUIRED_FIELD_MISSING: Required fields are missing: [AccountId]. You can look up ExceptionCode values in the SOAP API Developer Guide. Error ID: 44701433-132908 (-667225970): []


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));
       
    }

    if(taskList.size()>0){
        
        insert taskList;
        
    }
    
}

Hi There, I am stuck with the challenge 7 - Superbadge Process Automation :
error message: The Robot Setup Day of the Week formula does not seem to be working properly. The Day of the Week should not fall on Saturday or Sunday.
The process works fine when I am testing it. I added a second process only for the Robot Setup which determines Saturday/Sunday and adding 1/2 days.
The formula on the Robot Setup Date "[Opportunity].CloseDate ...." worked fine as well .
Nevertheless checking teh challenge brings always the same bl.. error.

Hi All,
I'm getting the following error while inserting quote in a test class :
System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, List has no rows for assignment to SObject: []
Please find the test class appended herewith :
@istest(SeeAllData=true)  private class TestSubmitforQuoteApproval {             static testmethod void test() {        Test.startTest();                   //Account acc = [select Id from Account limit 1];                   Opportunity oppr = new Opportunity();           //oppr.AccountId = acc.ID;           oppr.Annual_Contract_Value_ACV__c = 111;           oppr.BU__c = 'MJ';           oppr.CloseDate = Date.today();           oppr.Contract_Opportunity_Estimate_CoE__c = 111;           oppr.Total_Contract_Value_TCV__c = 111;            oppr.Name = 'SubmitforQuoteApproval';            oppr.StageName = 'Prospecting';             oppr.Date_on_Opportunity_Prospecting_Stage__c = Date.today();             //oppr.UpdatedForReminderToApprover__c = Date.today();           insert oppr;                      Quote quot = new Quote ();           quot.Name = 'TestPropForSandbox2016-1';            //quot.Status ='Draft';           quot.OpportunityId = oppr.id ;           insert quot;
}
}

Any help towards resolving this issue will be much appreciated

Thanks & Rgards,

Debendra Ray