Deleting a custom field/object should remove references with force:source:pull
Last updated 2019-10-12 ·Reference W-4157334 ·Reported By 46 users
When we Delete a custom field / object from Scratch org that is not removing its references from other components like Profiles , Permission sets , Layouts etc..
1. Create a scratch Org.
2. Create a custom object and profile.
3. Run source:pull command to sync changes in scratch Org to local repository.
4. Then Delete the custom object from Scratch Org created in Step 2.
5. Again Run source:pull command to sync the changes to local repository.
6. Create a new scratch Org.
7. Now Run a source:push command to push the metadata from local repository to newly create scratch Org.
8. That will fail with an error
no CustomObject named Custom_Object__c found
9. This is because this Object still having a reference in the Profile metadata file as the changes did not got synced to the references.
Manually remove the reference from the Profile metadata file.
Reported By (46)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.