[SalesForce] Error when deploying project to scratch org

I am facing a problem when deploying a project to my scratch org. I have a custom object named Project Information. This object is accessible to admins and user and the permission is set using permission sets. When i try to execute sfdx:force:push -u ProjectMgmtScratch, i am receiving an error like this.

force-app\main\default\layouts\Project_Information__c-Project
Information Layout.layout-meta.xml Invalid field:TASK.SUBJECT in
related list:RelatedActivityList.

I haven't touched the Task object but still facing this error. Has anyone had issue like this?

Best Answer

I had to remove my duplicate rule and matching rule from my project. This might be a bug in salesforce(not sure).

I tried deactivating the rules but unfortunately could not deploy it. So, try deleting the matchingrule and duplicaterule folders.

Edit: don't forget to delete the references of these rules from sourcePathInfos.json and metadataTypeInfos.json. These files contain matching and duplicate rule paths.

Related Topic