You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to generate a comprehensive deployment package with little or no manual intervention in order to make one sandbox's metadata "mirror" that of another's, short of performing an actual refresh. However, 'sf project manifest generate' generates a package.xml that can neither be retrieved nor deployed without significant modification.
Steps To Reproduce
Generate a comprehensive package.xml for the source org.
% sf project manifest generate --include-packages managed --from-org sandbox1
Retrieve metadata for the generated package.xml
% sf project retrieve start -x package.xml -o sandbox1
Deploy retrieved metadata to the target org
% sf project deploy validate -d force-app/main/default -o sandbox2
Expected result
It should be possible to make a target org in essence a "mirror" of a source org through metadata deployment with little or no manual intervention. One might expect the above sequence of commands to accomplish this.
Actual result
Significant manual intervention is required to update the generated package.xml before retrieving metadata -- and to update retrieved metadata before deploying, in order to work-around the following issues:
Step 2 above generates a slew of warnings, including:
"Entity of type 'ListView' named '[...]' cannot be found", where [...] may be one of more than 50 standard List Views, such as 'Task.UnscheduledTasks', 'Event.TodaysAgenda', 'WorkOrder.My_WorkOrders', etc.
"Entity type 'UiViewDefinition' is not available in this organization"
"Settings type: 'ConversationServiceIntegration' is unknown"
"Entity of type 'CustomMetadata' named '[...]' cannot be found" **
"Entity of type 'QuickAction' named '[...]' cannot be found" **
"Entity of type 'Layout' named '[...]' cannot be found" **
Step 3 above generates a slew of validation errors that must be addressed by modifying retrieved metadata, including:
"no UserLicense named Salesforce Integration found"
"Unknown user permission: CanAccessCE"
"Unknown user permission: ViewRestrictionAndScopingRules"
"no CustomField named Contact.GenderIdentity found"
"no CustomField named Contact.Pronouns found"
"no CustomField named Lead.GenderIdentity found"
"no CustomField named Lead.Pronouns found"
"You may not modify the permission Manage Forecasts Custom Data while editing a Standard Profile"
"Couldn't locate layout section: [name] in layout:[name]" **
** These issues are specific to managed package metadata types.
With respect to 'sf project manifest generate', the resultant package.xml omits the managed package namespace prefix on the second part of the member entry. For example, pkg__Object.pkg__Field is written to package.xml as pkg__Object.Field, with the namespace prefix omitted from Field.
With respect to 'sf project deploy' the retrieved objectTranslation metadata omits managed package namespace prefixes from entries, resulting in the "Could locate layout section" error on deploy.
Note that .forceignore is ignored during steps 1 and 2 but used by step 3. Inconsistent use of .forceignore by these commands further complicates the process.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
It should be possible to generate a comprehensive deployment package with little or no manual intervention in order to make one sandbox's metadata "mirror" that of another's, short of performing an actual refresh. However, 'sf project manifest generate' generates a package.xml that can neither be retrieved nor deployed without significant modification.
Steps To Reproduce
Generate a comprehensive package.xml for the source org.
% sf project manifest generate --include-packages managed --from-org sandbox1
Retrieve metadata for the generated package.xml
% sf project retrieve start -x package.xml -o sandbox1
Deploy retrieved metadata to the target org
% sf project deploy validate -d force-app/main/default -o sandbox2
Expected result
It should be possible to make a target org in essence a "mirror" of a source org through metadata deployment with little or no manual intervention. One might expect the above sequence of commands to accomplish this.
Actual result
Significant manual intervention is required to update the generated package.xml before retrieving metadata -- and to update retrieved metadata before deploying, in order to work-around the following issues:
Step 2 above generates a slew of warnings, including:
Step 3 above generates a slew of validation errors that must be addressed by modifying retrieved metadata, including:
** These issues are specific to managed package metadata types.
Note that .forceignore is ignored during steps 1 and 2 but used by step 3. Inconsistent use of .forceignore by these commands further complicates the process.
System Information
Additional information
Org Instances
As of Tuesday, October 31, 2023
Beta Was this translation helpful? Give feedback.
All reactions