當我嘗試創建一個新的OpportunityLineItemSchedule我遇到下面的錯誤..錯誤,同時創造了新的「OpportunityLineItemSchedule」使用SFDC合作伙伴API
錯誤代碼:INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY
錯誤消息:足夠的訪問權限交叉引用編號
附件是代碼片段。任何幫助將非常有用。
SObject[] rs = new SObject[1];
MessageElement[] specificRS = new MessageElement[6];
specificRS[0] = new MessageElement(new QName("OpportunityLineItemId"),"00k7000000DFLqfAAH");
specificRS[1] = new MessageElement(new QName("Description"),"Rev Schedule Descr");
specificRS[2] = new MessageElement(new QName("Type"),"Quantity");
specificRS[3] = new MessageElement(new QName("Quantity"),(double)2);
specificRS[4] = new MessageElement(new QName("Revenue"),(double)400000.00);
specificRS[5] = new MessageElement(new QName("ScheduleDate"),"2010-10-30");
rs[0] = new SObject();
rs[0].setType("OpportunityLineItemSchedule");
rs[0].set_any(specificRS);
SaveResult[] sr = null;
try {
sr = binding.create(rs);
} catch (Exception ex) {
System.out.println("An unexpected error has occurred." + ex.getMessage());
ex.printStackTrace();
return;
}