function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Trent Childers 17Trent Childers 17 

Install health cloud in a scratch org

Hello everyone!
My organization is attempting to transition our code base to SFDX. One of the things I wanted to implement was an automated process that would set up a scratch org. However, I'm not sure that's possible. I am following the instructions laid out in this doc:
https://developer.salesforce.com/docs/atlas.en-us.health_cloud.meta/health_cloud/admin_install_package.htm

So, first question, I have an install link to the health cloud package, is there any way to install that package from the command line using force:package:intall? I have tried to pull the package into my local environment and then push that to a scratch org, but I get errors (field tracking isn't enbled for some objects). I'm trying to find a way to eradicate manual steps in scratch org setup.

Secondly, there is a configuration step that requires going to Account Settings in Setup and enabling 'Allow Users to relate a contact to multiple accounts'. Is it possible to somehow enable this in the SFDX projects configuration file?

Thanks so much!
Vanessa Chalem 10Vanessa Chalem 10
Hi! Yes! 
So to answer your questions:
1. to automate the process, I would suggest a bash/shell script that goes through the sfdx commands- spinning up a scratch org with the necessary HC configuration, installing the packages and doing a push of metadata configuration from post deploy steps/other customizations 

2. Yes! you can use this install command: 
sfdx force:package:install --package 04t1C000000AoPO
The 04# that appears is the package version ID, which should appear on the url of the pckg that you install 

 3. Yes! your scratch org config file should look like the image attached.
Hope this helps - let me know if you have any questions 
User-added image
Randy SoleRandy Sole
Hi - this package ID is deprecated and I need to get the health cloud installed into the scratch org so I don't end up creating duplicate objects and having profiles that error during deployment testing. Is there a new package ID I can use or some other method to ensure my sratch orgs contain my HealthCloud objects?

Thanks - Randy
Trent Childers 17Trent Childers 17
Hi Randy. To get the latest health cloud version you can run
sfdx force:package:installed:list -u <your-dev-hub>

This will list out all of your packages and the current version id.
hary harohary haro
How can I integrate this scirpt in health servicw website? I want to add it in my CDN care (https://cdncare.ca) website.