0

I am trying to create via Enterprise WSDL create call an OrderItem record related to an order.

As per image below, inside my call i pass the OrderID, the PriceBook ID, Quantity and Line Description, but I am not able to add the Product ID (or Product2 identifier) since the field is missing inside the wsdl definition. I want to highlight also that the order item object has Product2 field inside object definition.

Could you please help me with this API call ? How can i add the product id to the orderItem creation call ?

I also tryied to add manually field inside the request, but when i try to execute it, i get the following error:

"Invalid foreign key relationship name Product2"

enter image description here

Thanks a lot in advance

1
  • I'm a bit puzzled; For OrderItem, you always supply the PriceBookEntryId and never the Product2Id - Product2Id is not a field on OrderItem. Is it possible you haven't enabled Pricebooks or given access to Products to the running user?
    – cropredy
    Dec 8, 2016 at 6:45

1 Answer 1

0

Did you download the enterprise wsdl again, after you added that field? Enterprise wsdl requires a download again after any changes to the object model.

1
  • Hi Shalini, the Enterprise wsdl is updated. However I have not added any field to objects. Dec 13, 2016 at 13:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .