Migrate Illuminated Cloud standard project into Salesforce DX

909 views
Skip to first unread message

Edmondo Porcu

unread,
Oct 20, 2017, 10:35:09 AM10/20/17
to Illuminated Cloud General Discussion
Hello,

is there a way to migrate quickly a standard project under vcs into salesforce dx? My open question is on how you would initialize a scratch org with all your production metadata so you can pull it in VCS

Thanks

Edmondo

sc...@illuminatedcloud.com

unread,
Oct 20, 2017, 10:40:16 AM10/20/17
to Illuminated Cloud General Discussion
Edmondo, Salesforce has published a few nice articles on how to migrate traditional projects into SFDX:


Once you follow those steps, you can create a new IC SFDX project against the resulting SFDX metadata and begin using IC for development.

Let me know if this doesn't help get you going.

Regards,
Scott Wells

Edmondo Porcu

unread,
Oct 20, 2017, 11:08:32 AM10/20/17
to Illuminated Cloud General Discussion
The problem with those steps is they assume you have a package.xml containing all the metadata of your organization, or that your code in your organization is deployed as a set of packages. This is not true in our case

sc...@illuminatedcloud.com

unread,
Oct 20, 2017, 11:15:13 AM10/20/17
to discu...@illuminatedcloud.com
Well, a key aspect of the migration from an existing traditional org to SFDX is the clear identification of the metadata subset that comprises your specific customizations to the org. You actually don't want to grab the full contents of the org and convert those into an SFDX project. That's an anti-goal. Instead you need to carefully determine which custom objects/fields, classes/triggers/pages/components, layouts, permission sets, etc., you should be managing under source control and only bring those along. In the end you should be able to apply those to any given org and end up with your customizations applied to that org. In fact, as you develop in SFDX scratch orgs, that's exactly what you'll be doing.

You can use IC to do that by creating a connection to the source and using the subscription editor to iteratively "sculpt" a subscription that represents your specific customizations. Once you have that, you can retrieve through that metadata subscription which will include a corresponding package.xml file, and then you can use sfdx force:mdapi:convert to being the migration from MDAPI format to SFDX format.

I've used this successfully several times now against source orgs in which no packaging has ever taken place. There's an up-front investment in the isolation of your specific value-add metadata components, but it's worth it to leave behind all of the cruft that you shouldn't be carrying around with you, e.g., unmodified standard objects/fields, workflows, layouts, etc.

Regards,
Scott

Edmondo Porcu

unread,
Oct 20, 2017, 11:16:47 AM10/20/17
to Illuminated Cloud General Discussion
I think that is the right answer, how does the subscription editor work / where is it located?

sc...@illuminatedcloud.com

unread,
Oct 20, 2017, 11:21:40 AM10/20/17
to Illuminated Cloud General Discussion
You can find it under Illuminated Cloud>Configure Module. If you want to set your subscription up point-and-click just choose Selected and click the Refresh toolbar button, then check the items in the selection tree that would represent your specific customizations to any given vanilla org into which they're deployed. Once you have it the way you want, just retrieve at the Project or Module level and the package.xml file will be included as well. Note that the resulting package.xml file does not include any wildcards to ensure that exactly the metadata you've selected is retrieved and nothing else. It's up to you as to whether you want to optimize that file to include wildcards.

Let me know if you have any other questions.

Regards,
Scott
Reply all
Reply to author
Forward
0 new messages