2014-05-21 58 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的方法。

相關問題