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
Sandy WangSandy Wang 

Salesforce to Salesforce - Unit Test without SeeAllData=true

Is there a way to create unit tests for Salesforce to Salesforce without setting SeeAllData=true? 

I can't seem to create test objects for PartnerNetworkRecordConnection and PartnerNetworkConnection. Is there a way to create unit test cases without using live test data for Salesforce to Salesforce? 
Richard Jimenez 9Richard Jimenez 9
Hi Sandy,

It looks possible to create the PartnerNetworkRecordConnection records (see https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_partnernetworkrecordconnection.htm), but it looks like you need to use SeeAllData to pull back an existing PartnerNetworkConnection record to use.

See this link for other discussions on this subject: http://salesforce.stackexchange.com/questions/14868/how-to-test-a-trigger-relying-on-partnernetworkconnection-and-partnernetworkconn

Hope that helps,
Richard.