I have an issue where a some reports and a custom report folder were created in production but I need to add them to version control so that it can be properly managed within the source of truth. I have pulled down the metadata and convert it to source where it now resides in the following:
Unfortunately when I attempt to push this to a scratch org like so:
sfdx force:source:push -u test
I get the following error:
In field: sharedTo - no User named firstname.lastname@example.org found
The obvious answer seems to be that my email is stored directly in the metadata like so:
<?xml version="1.0" encoding="UTF-8"?> <ReportFolder xmlns="http://soap.sforce.com/2006/04/metadata"> <folderShares> <accessLevel>Manage</accessLevel> <sharedTo>email@example.com</sharedTo> <sharedToType>User</sharedToType> </folderShares> <name>DPC Reports</name> </ReportFolder>
So how do I work around this? The data setting is stored in the metadata and that value is going to change from org to org so I will have deployment issue every time if the org doesn't contain that user email.