function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gabriele Al Jarrah Al K.Gabriele Al Jarrah Al K. 

OrderItem Creation via Enterprise wsdl call

Dear experts,

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 <ns3:Product2> field inside the request, but when i try to execute it, i get the following error: "Invalid foreign key relationship name Product2"
User-added image
Thank you very much in advance