You need to sign in to do that
Don't have an account?
alaschgari
Salesforce to Salesforce: Testclass - PartnerNetworkRecordConnection Status from Invite to Accepted
Hey folks,
I'm writing a testclass for my Salesforce to Salesforce class. Here's the code so far:
public with sharing class sf42_TestClass { public static testmethod void testAccountForwarding() { Test.startTest(); Account a = sf42_TestDataGenerator.createTestAccount(1, true); Contact c = sf42_TestDataGenerator.createTestContact(1, a.Id, true); PartnerNetworkRecordConnection pnrc = [SELECT Status, LocalRecordId FROM PartnerNetworkRecordConnection WHERE LocalRecordId = :a.Id LIMIT 1]; System.assertEquals(a.Id, pnrc.LocalRecordId); System.assertEquals('Invite', pnrc.Status); Test.stopTest(); } }
How am I able to change the status 'Invite' to 'Accepted'?
EDIT: Sorry, I want to change it form 'invite' to 'Sent'!
Cheers
Josh
Hi alaschgari,
Please refer this link to create test for S2S http://boards.developerforce.com/t5/Apex-Code-Development/test-coverage-problem-for-salesforce-to-salesforce-connection/td-p/489959
If this link is help ful to solve your problem please mar as solved to help other because it is a regular problam.
---
Thanks
Usman
Hi MoUsman,
Thanks for your link, but no that doesn't solve the problem.
Hi,
I ran into the same issue.
Appreciate your help, if you could solve the problem.
Short description:
- Salesforce to Salesforce is configured
- Saving CONTACT Apex Trigger moves CONTACT to the target org
PROBLEM occures in my Test Class when saving Contact:
- Test class :
* Account is created.
* PartnerNetworkRecordConnection is available but in status "Invite"