2014-05-21 59 views
0

我是SFDC的新手。我如何使用Apex创建/更新潜在客户?如何创建/更新潜在客户?

我试过了;

@isTest 
private class TestClass { 
    static testMethod void testLogic() { 
     //Create new lead 
     // insert new Lead(Company = 'Lead Company', FirstName = 'firstname', LastName = 'lastname', Email = '[email protected]'); 

    } 
} 

测试用例是成功的,但我不能看到的Leads点击SFDC UI纪录。请帮帮我!

回答

0

运行测试方法时,所有写入数据库的操作都不会影响当前的数据库(除非指定不能读取当前数据库)。

运行以下行,在执行匿名将创建领先:

insert new Lead(Company = 'Lead Company', FirstName = 'firstname', LastName = 'lastname', Email = '[email protected]'); 

或者只是创建一个普通班,并呼吁从VF的方法。

相关问题