You need to sign in to do that
Don't have an account?
sfdc sfdc 126
unable to deploy my code in production getting dupecatcher testclass failed
My problem is my apex classes and Test class have 80% code coverage but we have dupecather installed in our org so that dupecather test class is not allowing to deploy
SetupOwnerId duplicates value on record with id: 0000: [] Stack Trace:testclass: line 9, column 1
This test class is dupecatcher test class whic have no acees to it
Issue here is it is trying to create a duplicate record where the external unique id may be stopping it from creation.
Regards,
Mahesh
isTest(seealldata=true)
public class CloneAccountsControllerTest {
static testmethod void test (){
AccountsContact__c accCon=new AccountsContact__c();
//String pageId;
accCon.Destination_Text__c='abc';
accCon.Source_Text__c='test';
insert accCon;
Account acc=new Account();
acc.name='XYZ';
insert acc;
Account acc1=new Account();
acc1.name='XYZt';
insert acc1;
/*Account acc1=new Account();
acc1.name='XYZ12';
insert acc1;*/
Contact con=new Contact();
con.Accountid=acc.id;
con.firstname='first';
con.lastname='last';
insert con;
//pageId=Apexpages.currentPage().getParameters().put('id',acc.id);
List<account> accounts=new List<account>();
//accounts.add(acc);
//accounts.add(acc1);
accounts.add(acc);
//accounts.setselected()
// insert accounts;
//set<String> selectedid=new set<String>();
//selectedid.add(acc.id);
ApexPages.StandardSetController stdController = new ApexPages.StandardSetController(accounts);
stdController.setselected(accounts);
//accounts=stdController.getSelected();
CloneAccountsController cloneAccCon=new CloneAccountsController(stdController);
//cloneAccCon.objs.add(acc);
cloneAccCon.insertdata();
}