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

  • 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 '16 at 6:45
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.

  • Hi Shalini, the Enterprise wsdl is updated. However I have not added any field to objects. – Gabriele Kahal Dec 13 '16 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.