+ Start a Discussion
GAURAV SETHGAURAV SETH 

How to add dependency for Installed packages in package.xml for scratch org

Hi ,

I installed the package SDocs for document generation in my partner org .When I am trying to migrate the code thru package.xml to work on scratch orgs, I am facing lot of dependency error for SDocs.
Error  force-app/main/default/objects/SDOC__SDField__c/SDOC__SDField__c.object-meta.xml                                  Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API
Error  force-app/main/default/objects/SDOC__SDJob__c/SDOC__SDJob__c.object-meta.xml                                      Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API
Error  force-app/main/default/objects/SDOC__SDRelationship__c/SDOC__SDRelationship__c.object-meta.xml                    Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API
Error  force-app/main/default/objects/Account/webLinks/SDOC__Email_Docs.webLink-meta.xml                                 Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API (815:15)
Error  force-app/main/default/objects/SDOC__SDoc__c/SDOC__SDoc__c.object-meta.xml                                        Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API

Error  force-app/main/default/objects/SDOC__SDTemplate__c/SDOC__SDTemplate__c.object-meta.xml                            Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API
Error  force-app/main/default/objects/Account/webLinks/SDOC__S_Docs.webLink-meta.xml                                     Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API (826:15)
Error  force-app/main/default/objects/Contact/webLinks/SDOC__Add_to_Mass_Merge_List.webLink-meta.xml                     Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API (753:15)
Error  force-app/main/default/objects/Contact/webLinks/SDOC__Email_Docs.webLink-meta.xml                                 Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API (766:15)
Error  force-app/main/default/objects/Contact/webLinks/SDOC__S_Docs.webLink-meta.xml                                     Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API (777:15)
Error  force-app/main/default/objects/Contact/webLinks/SDOC__View_Mass_Merge_List.webLink-meta.xml                       Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API (788:15)
Error  force-app/main/default/objects/Event/webLinks/SDOC__S_Docs.webLink-meta.xml                                       Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API (232:15)
Error  force-app/main/default/objects/Lead/webLinks/SDOC__Email_Docs.webLink-meta.xml                                    Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API (480:15)
Error  force-app/main/default/objects/Lead/webLinks/SDOC__S_Docs.webLink-meta.xml                                        Cannot create a new component with the namespace: SDOC.  Only components in the same namespace as the organization can be created through the API (491:15)

Error  force-app/main/default/profiles/AMS.profile-meta.xml                                                              In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/profiles/ADJ Clerk.profile-meta.xml                                                        In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/profiles/AMSCustomerCommunityPlus.profile-meta.xml                                         In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/permissionsets/ADJClerk_test.permissionset-meta.xml                                        In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/permissionsets/ADJCreate.permissionset-meta.xml                                            In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/permissionsets/ADJManager.permissionset-meta.xml                                           In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/permissionsets/ADJWCJ.permissionset-meta.xml                                               In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/permissionsets/Admin.permissionset-meta.xml                                                In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/permissionsets/Analytics.permissionset-meta.xml                                            In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/permissionsets/Analytics_Cloud_Explorer.permissionset-meta.xml                             In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/permissionsets/Analytics_Int_User.permissionset-meta.xml                                   In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/permissionsets/Einsten.permissionset-meta.xml                                              In field: field - no CustomObject named SDOC__SDField__c found
Error  force-app/main/default/recordActionDeployments/ScheduleHearing.deployment-meta.xml                                In field: QuickAction - no QuickAction named SDOC__SendEmail found
Error  force-app/main/default/recordActionDeployments/RecommendationDeployment.deployment-meta.xml                       Looks like this flow is inactive. Ask your Salesforce admin to activate it.Error  force-app/main/default/layouts/Account-Account Layout.layout-meta.xml                                             In field: customButtons - no WebLink named Account.SDOC__S_Docs found (219:34)
ERROR running force:source:push:  Push failed.


Please guide me.
AbhishekAbhishek (Salesforce Developers) 
Hi,

This blog might answer your query,

https://salesforce.stackexchange.com/questions/198080/installing-managed-packages-to-scratch-org-via-configuration

Thanks.