<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: Using Test.loadData to import records with relationship	</title>
	<atom:link href="https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/</link>
	<description>AI, Salesforce, ServiceNow &#38; Enterprise Tech Guides</description>
	<lastBuildDate>Tue, 19 Feb 2019 15:49:10 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		By: Abhik Saha		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-5048</link>

		<dc:creator><![CDATA[Abhik Saha]]></dc:creator>
		<pubDate>Tue, 19 Feb 2019 15:49:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=5152#comment-5048</guid>

					<description><![CDATA[Thanks for the Post. But can you confirm, whether this works for single deployment in production, where static resources might get loaded after test class success run.]]></description>
			<content:encoded><![CDATA[<p>Thanks for the Post. But can you confirm, whether this works for single deployment in production, where static resources might get loaded after test class success run.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Khan		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-4592</link>

		<dc:creator><![CDATA[Khan]]></dc:creator>
		<pubDate>Thu, 02 Aug 2018 06:58:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=5152#comment-4592</guid>

					<description><![CDATA[Hi Jitendra,  

I am loading a CSV file via Static Resource to test my APEX code. I am using the following code in my test: List CS = Test.loadData(Custom_Settings__c.sObjectType, &#039;CSData&#039;);

The first few lines of the CSV file look like below: followed by field values in next lines
Name,Type__c
CS1,Type1
CS2,Type2


This is not working. It gives me &quot;System.StringException: Unknown field: Name,Type__c,  ....   These are valid  API field names of Custom settings. Can you please assist here.

Thanks,
Khan]]></description>
			<content:encoded><![CDATA[<p>Hi Jitendra,  </p>
<p>I am loading a CSV file via Static Resource to test my APEX code. I am using the following code in my test: List CS = Test.loadData(Custom_Settings__c.sObjectType, &#8216;CSData&#8217;);</p>
<p>The first few lines of the CSV file look like below: followed by field values in next lines<br />
Name,Type__c<br />
CS1,Type1<br />
CS2,Type2</p>
<p>This is not working. It gives me &#8220;System.StringException: Unknown field: Name,Type__c,  &#8230;.   These are valid  API field names of Custom settings. Can you please assist here.</p>
<p>Thanks,<br />
Khan</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jitendra Zaa		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-3937</link>

		<dc:creator><![CDATA[Jitendra Zaa]]></dc:creator>
		<pubDate>Mon, 29 Jan 2018 18:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=5152#comment-3937</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-3936&quot;&gt;SS&lt;/a&gt;.

It Seems Salesforce Issue. Would suggest to raise case to Salesforce support.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-3936">SS</a>.</p>
<p>It Seems Salesforce Issue. Would suggest to raise case to Salesforce support.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: SS		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-3936</link>

		<dc:creator><![CDATA[SS]]></dc:creator>
		<pubDate>Mon, 29 Jan 2018 14:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=5152#comment-3936</guid>

					<description><![CDATA[My test classes with this method of data setup are working fine in one sandbox while they are failing with a weird error in another sandbox. Need help. Tried googling but couldnt find a relevant answer anywhere. Please help.
System.SObjectException: ORA-20001: ORA-06512: at &quot;DOPEY.COLDACCESSCUST&quot;, line 52 ORA-06512: at &quot;DOPEY.CACCESS&quot;, line 2979 ORA-06512: at &quot;DOPEY.CACCESS&quot;, line 2768 ORA-06512: at line 1 SQLException while executing plsql statement: {call cAccess.check_entity_access_proc_ncu(?,?,?,?,?,?)}(EXCLUDED, EXCLUDED, a98W0000000Cbcq, EXCLUDED, true, false)]]></description>
			<content:encoded><![CDATA[<p>My test classes with this method of data setup are working fine in one sandbox while they are failing with a weird error in another sandbox. Need help. Tried googling but couldnt find a relevant answer anywhere. Please help.<br />
System.SObjectException: ORA-20001: ORA-06512: at &#8220;DOPEY.COLDACCESSCUST&#8221;, line 52 ORA-06512: at &#8220;DOPEY.CACCESS&#8221;, line 2979 ORA-06512: at &#8220;DOPEY.CACCESS&#8221;, line 2768 ORA-06512: at line 1 SQLException while executing plsql statement: {call cAccess.check_entity_access_proc_ncu(?,?,?,?,?,?)}(EXCLUDED, EXCLUDED, a98W0000000Cbcq, EXCLUDED, true, false)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Smriti		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-3887</link>

		<dc:creator><![CDATA[Smriti]]></dc:creator>
		<pubDate>Fri, 15 Dec 2017 21:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=5152#comment-3887</guid>

					<description><![CDATA[This is awesome! Can you tell me if we have any option for updating? 
Else an option of filling the self lookup fields?]]></description>
			<content:encoded><![CDATA[<p>This is awesome! Can you tell me if we have any option for updating?<br />
Else an option of filling the self lookup fields?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sumit		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-3831</link>

		<dc:creator><![CDATA[Sumit]]></dc:creator>
		<pubDate>Tue, 24 Oct 2017 18:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=5152#comment-3831</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-3280&quot;&gt;Bao N&lt;/a&gt;.

I am also getting the same error ... is there any solution?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-3280">Bao N</a>.</p>
<p>I am also getting the same error &#8230; is there any solution?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Pavan Dave		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-3438</link>

		<dc:creator><![CDATA[Pavan Dave]]></dc:creator>
		<pubDate>Thu, 08 Sep 2016 08:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=5152#comment-3438</guid>

					<description><![CDATA[That was exactly I was looking, Jit :) 
But I ran into another problem to load Attachment as Test.loadData(). The problem is body field. This field is not accepting any value (like text or any web URL) and giving this error - System.StringException: CSV Parse error: Body: value not of required type.
It would be great if you can suggest something. Thanks in advance.]]></description>
			<content:encoded><![CDATA[<p>That was exactly I was looking, Jit 🙂<br />
But I ran into another problem to load Attachment as Test.loadData(). The problem is body field. This field is not accepting any value (like text or any web URL) and giving this error &#8211; System.StringException: CSV Parse error: Body: value not of required type.<br />
It would be great if you can suggest something. Thanks in advance.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Bao N		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-3280</link>

		<dc:creator><![CDATA[Bao N]]></dc:creator>
		<pubDate>Mon, 11 Jul 2016 11:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=5152#comment-3280</guid>

					<description><![CDATA[When I try to loadData for one more child-sObject of Account, for example &quot;Contract&quot; sObject, the Error below occured:
         Validation Errors While Saving Record(s)
         OrderedDict([(u&#039;@xsi:nil&#039;, u&#039;true&#039;)])

//Load CSV file saved in static resource 
List lstAcc = Test.loadData(Account.sObjectType,&#039;AccountLoad_Test&#039;);
List lstCon = Test.loadData(Contact.sObjectType,&#039;ContactLoad_Test&#039;);
List lstContract = Test.loadData(Contract.sObjectType,&#039;ContractLoad_Test&#039;); //This row causes error]]></description>
			<content:encoded><![CDATA[<p>When I try to loadData for one more child-sObject of Account, for example &#8220;Contract&#8221; sObject, the Error below occured:<br />
         Validation Errors While Saving Record(s)<br />
         OrderedDict([(u&#8217;@xsi:nil&#8217;, u&#8217;true&#8217;)])</p>
<p>//Load CSV file saved in static resource<br />
List lstAcc = Test.loadData(Account.sObjectType,&#8217;AccountLoad_Test&#8217;);<br />
List lstCon = Test.loadData(Contact.sObjectType,&#8217;ContactLoad_Test&#8217;);<br />
List lstContract = Test.loadData(Contract.sObjectType,&#8217;ContractLoad_Test&#8217;); //This row causes error</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jitendra Zaa		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-2997</link>

		<dc:creator><![CDATA[Jitendra Zaa]]></dc:creator>
		<pubDate>Fri, 12 Feb 2016 14:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=5152#comment-2997</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-2995&quot;&gt;Kunal C&lt;/a&gt;.

Yeah, it should work]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-2995">Kunal C</a>.</p>
<p>Yeah, it should work</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kunal C		</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/using-test-loaddata-to-import-records-with-relationship/#comment-2995</link>

		<dc:creator><![CDATA[Kunal C]]></dc:creator>
		<pubDate>Fri, 12 Feb 2016 12:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=5152#comment-2995</guid>

					<description><![CDATA[Does this work in the same way for Custom Objects?
And I need to do this with a Custom Object whose parent is the standard User object. Will the same work for this scenario?]]></description>
			<content:encoded><![CDATA[<p>Does this work in the same way for Custom Objects?<br />
And I need to do this with a Custom Object whose parent is the standard User object. Will the same work for this scenario?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: www.jitendrazaa.com @ 2026-06-27 18:01:47 by W3 Total Cache
-->