<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>scratch org &#8211; Hamza Siddiqui</title>
	<atom:link href="https://www.mhamzas.com/blog/tag/scratch-org/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.mhamzas.com</link>
	<description>4x Salesforce MVP &#124; 26x Certified &#124; Salesforce App &#38; System Architect</description>
	<lastBuildDate>Tue, 04 Aug 2020 12:54:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
<site xmlns="com-wordpress:feed-additions:1">233526040</site>	<item>
		<title>SFDX Quick Tip: Pulling source from a Sandbox into an SFDX project.</title>
		<link>https://www.mhamzas.com/blog/2020/08/04/sfdx-quick-tip-pulling-source-from-a-sandbox-into-an-sfdx-project/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sfdx-quick-tip-pulling-source-from-a-sandbox-into-an-sfdx-project</link>
		
		<dc:creator><![CDATA[hamza]]></dc:creator>
		<pubDate>Tue, 04 Aug 2020 12:54:52 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[scratch org]]></category>
		<category><![CDATA[sfdx]]></category>
		<guid isPermaLink="false">https://www.mhamzas.com/?p=3173</guid>

					<description><![CDATA[Create an unmanaged package with everything you want to move over. Convert the unmanaged package with the SFDX CLI Push to a Scratch Org Create the unmanaged package Setup &#62; Quick Find &#62; "Package" &#62; Create &#62; Packages Next Select the files <br /><a href="https://www.mhamzas.com/blog/2020/08/04/sfdx-quick-tip-pulling-source-from-a-sandbox-into-an-sfdx-project/" class="more-link btn btn-primary">Read More</a>]]></description>
										<content:encoded><![CDATA[
<ol class="wp-block-list"><li>Create an unmanaged package with everything you want to move over.</li><li>Convert the unmanaged package with the SFDX CLI</li><li>Push to a Scratch Org</li></ol>



<h2 class="wp-block-heading" id="ddcd">Create the unmanaged package</h2>



<p><code>Setup &gt; Quick Find &gt; "Package" &gt; Create &gt; Packages</code></p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/miro.medium.com/max/3068/1%2Ar-KLhYAQoxuSArfTGSJrxQ.png?w=640&#038;ssl=1" alt="Image for post"/><figcaption>Create the Package</figcaption></figure>



<p>Next Select the files you want:</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/miro.medium.com/max/4264/1%2AUHRoO7njx9aes4r18pAcsw.png?w=640&#038;ssl=1" alt="Image for post"/><figcaption>Select the files you want</figcaption></figure>



<p>Retrieve the package with the CLI:</p>



<p><code>sfdx force:mdapi:retrieve -s -r {{pathToCreatePackageFile}} -u {{sandboxUsername}} -p {{packageName}}</code></p>



<p>Example:</p>



<p><code>mkdir package</code></p>



<p><code>sfdx force:mdapi:retrieve -s -r package/ -u jeff@salesforce.com -p sfdxTransfer</code></p>



<p>You’ll then get a package in the directory you specified.</p>



<h2 class="wp-block-heading" id="3356">Convert the package to an SFDX project</h2>



<p>With SFDX:&nbsp;<code>sfdx force:mdapi:convert -r package/</code></p>



<p>This will create new files from the old package data.</p>



<h2 class="wp-block-heading" id="8d10">Push to a Scratch Org</h2>



<p>And last step is to push to a scratch org.</p>



<p><code>sfdx force:source:push</code>&nbsp;will push to your default scratch org.</p>



<p>You will likely get an error or two, just read through and resolve. For example if you’re missing a field on an object you will have to create that in your scratch org. Use <code>sfdx force:org:open</code> to open your scratch org and <code>sfdx force:source:pull</code> to pull changes that you make.</p>



<p>Source: <a href="https://medium.com/eigen-x/sfdx-quick-tip-pulling-source-from-a-sandbox-into-an-sfdx-project-2361835d9f98">https://medium.com/eigen-x/sfdx-quick-tip-pulling-source-from-a-sandbox-into-an-sfdx-project-2361835d9f98</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3173</post-id>	</item>
	</channel>
</rss>
