Salesforce Asked by josephh on October 4, 2021
I am trying to use force:mdapi:retrieve with force:madpi:deploy to move some sandbox dev org custom objects and supporting customisations to a scratch org, in order to be able to subsequently push a source code package. I am fetching and deploying a subset of the custom objects via mdapi so that my scratch org has all the necessary custom objects used by Apex controller code (SOQL statements etc) in my source code project. In my manifest for the mdapi:retrieve and mdapi:deploy I specify all the custom objects and custom fields we seem to need and I’ve also added,
<types>
<members>Admin.profile</members>
<name>Profile</name>
</types>
Is there something I need to include in my manifest to avoid the error I am seeing when I try and deploy my unpackaged.zip to my scratch org: "Error unpackaged/objects/Policy__c.object Policy__c Profile Search Layout: – System Administrator – not appropriate for object 01I7E0000017CS5"
The sandbox dev org I am fetching metadata from includes a search layout assigned to the system administrator profile – with 3 fields specified for the search layout, 2 of which are custom fields and the other is the standard name field. The custom object file definition – fetched by force:mdapi:retrieve mentions these bits, that i assume are the relevant parts,
<profileSearchLayouts>
<fields>NAME</fields>
<fields>Account__c</fields>
<fields>Status__c</fields>
<profileName>System Administrator</profileName>
</profileSearchLayouts>
and
<searchLayouts>
<customTabListAdditionalFields>Type__c</customTabListAdditionalFields>
<customTabListAdditionalFields>Status__c</customTabListAdditionalFields>
<customTabListAdditionalFields>Account__c</customTabListAdditionalFields>
<customTabListAdditionalFields>Line_of_Business__c</customTabListAdditionalFields>
<customTabListAdditionalFields>Renewal_Date__c</customTabListAdditionalFields>
<customTabListAdditionalFields>UPDATEDBY_USER</customTabListAdditionalFields>
<lookupDialogsAdditionalFields>Account__c</lookupDialogsAdditionalFields>
<lookupDialogsAdditionalFields>Line_of_Business__c</lookupDialogsAdditionalFields>
<searchResultsAdditionalFields>Account__c</searchResultsAdditionalFields>
<searchResultsAdditionalFields>Status__c</searchResultsAdditionalFields>
</searchLayouts>
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP