Salesforce 如何创建/更新潜在客户?
我是SFDC的新手。如何使用Apex创建/更新潜在客户 我试过了Salesforce 如何创建/更新潜在客户?,salesforce,apex,Salesforce,Apex,我是SFDC的新手。如何使用Apex创建/更新潜在客户 我试过了 @isTest private class TestClass { static testMethod void testLogic() { //Create new lead // insert new Lead(Company = 'Lead Company', FirstName = 'firstname', LastName = 'lastname', Email = 'some@g
@isTest
private class TestClass {
static testMethod void testLogic() {
//Create new lead
// insert new Lead(Company = 'Lead Company', FirstName = 'firstname', LastName = 'lastname', Email = 'some@gmail.com');
}
}
测试用例成功了,但我在点击Lead时在SFDC UI上看不到记录。请帮帮我 运行测试方法时,对数据库的所有写入也不会影响当前数据库,除非指定您无法读取当前数据库 在“执行匿名”中运行以下行将创建潜在客户:
insert new Lead(Company = 'Lead Company', FirstName = 'firstname', LastName = 'lastname', Email = 'some@gmail.com');
或者只是创建一个常规类并从VF调用其方法