Salesforce DX does not track some of the changes I make on my scratch org.
How to reproduce a problem:
- Create a custom profile ->
sfdx force:source:pull
- Create a custom object ->
sfdx force:source:pull
- Delete a custom object ->
sfdx force:source:pull
sfdx force:source:status
shows no problemsThen an interesting thing might be observed – opening a new scratch org and pushing a source there causes the following error:
PROJECT PATH ERROR ─────────────────────────────────────── ──────────────────────────────────────────────── force-app\main\default\profiles\My Custom Profile.profile-meta.xml In field: field - no CustomObject named Custom_Object__c found The problem is that in the "My Custom Profile.profile-meta.xml" file there's still a <layoutAssignments>` section which I have to delete manually: <layoutAssignments> <layout>Custom_Object__c-Custom Object Layout</layout> </layoutAssignments>
My question is: Can I make SFDX to track these changes somehow?
PS Another thing is that it looks like a bug a bit but I’m just not sure.
Update 11/04/20:
The bug has been fixed on the Winter ’20 Patch 7.0
Older Update:
I’ve reported this case and Salesforce Support identified it as a bug:[Deleting a custom field/object should remove references with force:source:pull][2] Help to resolve this problem by clicking "This Issue Affects Me".
Answer
Attribution
Source : Link , Question Author : Przemysław Długoszewski-Tamoń , Answer Author : Community