0

I receive the below "fatal error" running a deployment to a dev sandbox that includes destructive changes. The error occurs after tests run:

EntityObject can not be initialized with null EntityInfo

I am using the following command to trigger the deployment

sfdx force:source:deploy --predestructivechanges destructive-changes/destructiveChangesPre.xml -x temp-deploy-manifest.xml -w 200 --testlevel RunLocalTests

I ran a validation deploy before the full deploy and both the deployment and tests completed successfully without error. Here is the command I used for the validation deploy:

sfdx force:source:deploy --checkonly --predestructivechanges destructive-changes/destructiveChangesPre.xml -x temp-deploy-manifest.xml -w 200 --testlevel RunLocalTests

How can I resolve the error in my deployment?

More context:

Screenshot of error [![enter image description here][1]][1] [1]: https://i.sstatic.net/GVpTL.png

Here is my destructiveChangesPre.xml file

<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>MDF_Claim__c</members>
        <members>MDF_Request__c</members>
        <members>MDF_Budget__c</members>
        <name>CustomObject</name>
    </types>
    <!-- <types>
        <members>MDF_Claim__c.MDF_Claims_Approval</members>
        <members>MDF_Request__c.MDF_Request_Approval</members>
        <name>ApprovalProcess</name>
    </types> -->
    <types>
        <members>MDF_Request__c.MDF_Request_Populate_Partner_Parent_Acco</members>
        <name>WorkflowFieldUpdate</name>
    </types>
    <types>
        <members>Opportunity.Partners_can_not_update_Stage_and_Name</members>
        <members>Opportunity.Opportunity_Owner_cannot_be_Partner_User</members>
        <members>Lead.Owner_Account_Partner_Name_must_match</members>
        <members>Lead.Partners_cannot_own_records_upon_convert</members>
        <members>Lead.Partner_can_not_update_Lead_Status</members>
        <name>ValidationRule</name>
    </types>
    <types>
        <members>Partner_Community_Home</members>
        <name>CustomTab</name>
    </types>
    <!-- <types>
        <members>MDF_Budget__c.Total_Budget_Allocated_to_Requests__c</members>
        <name>CustomField</name>
    </types> -->
    <types>
        <members>Channel_Account_Management</members>
        <name>CustomApplication</name>
    </types>
    <types>
        <members>Landing</members>
        <name>ApexPage</name>
    </types>
    <types>
        <members>unfiled$public/Deal_Registration_Opportunity_Closed_Lost</members>
        <members>unfiled$public/Deal_Registration_Opportunity_Closed_Won</members>
        <members>unfiled$public/Deal_Registration_Approved</members>
        <members>unfiled$public/Deal_Registration_Submitted</members>
        <members>unfiled$public/Deal_Registration_Submitted_CAM</members>
        <members>unfiled$public/Deal_Registration_Submitted_Sales_Team</members>
        <members>unfiled$public/Opportunity_Owner_notification_of_Partner_Updates</members>
        <members>unfiled$public/Deal_Registration_Rejected</members>
        <name>EmailTemplate</name>
    </types>
    <types>
        <members>Lead.Lead_Detail</members>
        <members>Lead.Partner_Deal_Registration</members>
        <name>FieldSet</name>
    </types>
    <types>
        <members>Account-Partner Community User Layout</members>
        <members>Opportunity-Partner Opportunity Layout</members>
        <members>Lead-Deal Registration Layout</members>
        <members>Lead-Deal Registration Layout - Partner Restricted</members>
        <name>Layout</name>
    </types>
    <types>
        <members>Opportunity.Partner_User_Notification_of_Opportunity_Closed_Won</members>
        <members>Opportunity.Partner_User_Notification_of_Opportunity_Closed_Lost</members>
        <members>Opportunity.Partner_Status_UserUpdate_Notification</members>
        <members>Lead.Deal_Registration_Approved</members>
        <members>Lead.Deal_Registration_Declined</members>
        <members>Lead.Deal_Registration_Submitted</members>
        <members>Lead.Deal_Registration_Submitted_Sales</members>
        <members>Lead.Deal_Registration_Submitted_CAM</members>
        <name>WorkflowAlert</name>
    </types>
    <types>
        <members>Opportunity.Partner User Notification of Opportunity Closed Lost</members>
        <members>Opportunity.Partner User Notification of Opportunity Closed Won</members>
        <members>Opportunity.CAM notification of Partner update</members>
        <members>Lead.Deal Registration Submitted: Macnica</members>
        <members>Lead.Lead: Populate Partner Parent Account</members>
        <members>Lead.Deal Registration successfully submitted</members>
        <members>Lead.Deal Registration Declined</members>
        <members>Lead.Deal Registration Approved</members>
        <name>WorkflowRule</name>
    </types>
    <types>
        <members>Distributor_Partner_Closed_Won-1</members>
        <members>MDF_CAM-1</members>
        <members>MDF_Claim_CAM-1</members>
        <members>Leads_Populate_Partner_User_on_Deal_Registrations-1</members>
        <members>Leads_Channel_Account_Manager-1</members>
        <name>Flow</name>
    </types>
    <types>
        <members>LeadPartner_Tests</members>
        <members>ChannelAccountService</members>
        <members>ChannelAccountServiceTest</members>
        <members>ConvertLead</members>
        <members>ConvertLead_Test</members>
        <members>F8_Landing</members>
        <members>F8_Login</members>
        <members>F8_Test_ForgotYourPasswordController</members>
        <members>F8_Test_Landing</members>
        <members>F8_Test_SigninCtrl</members>
        <name>ApexClass</name>
    </types>
</Package>
1
  • 1
    On the surface, the error looks like a permission issue. You may need to check the deployment user has the necessary FLS, APEX sharing etc., localised to the code being deployed. Or try to identify the specific Apex causing the issue to find where the null value is being passed. Commented Jul 26, 2023 at 21:45

0

You must log in to answer this question.