我已经创建了一个 product2,但我无法在 asp.net 应用程序中为该产品添加标准价格。这是我的代码
Product2 p = new Product2();
p.Name = "randi";
p.IsActive = true;
saveresults = SfdcBinding.create(new sObject[] { p });
p.Id = saveresults[0].id;
QueryResult qr = SfdcBinding.query("select ID, Name, IsStandard from PriceBook2 WHERE IsStandard=true");
sObject[] records = qr.records;
string ID = records[0].Id;
PricebookEntry pbe = new PricebookEntry();
pbe.Pricebook2Id = ID;
pbe.Product2Id=p.Id;
pbe.IsActive=true;
pbe.UnitPrice=100.0;
pbe.UseStandardPrice= false;`enter code here`
saveresults = SfdcBinding.create(new sObject[] { pbe });
但它不工作?有人可以帮帮我吗?