I'm using the following gem to connect to Microsoft Dynamics CRM: https://github.com/TinderBox/dynamics_crm. I was able to connect and add contacts, leads and a few other things just fine. My problem is, I can't figure out how to add an order and order details. Here is the code I am using to create an order detail:
details = Hash.new
details = {
'quantity' => 1000.0,
'productid' => product,
'salesorderid' => DynamicsCRM::XML::EntityReference.new("salesorder", order.id),
'uomid' => DynamicsCRM::XML::EntityReference.new("uom", 'F5AE673D-5D8E-E211-8AD0-78E3B5101E8F'),
'createdon' => Time.now.getutc,
'salesorderstatecode' => 1,
'description' => 'This is just a test order',
}
orderDetail = client.create('salesorderdetail', details)
This runs fine, but when I check in the CRM backend, there is no record under Order Details. I also can't figure out how to send custom fields, I have tried 'new_shirtsize' => 'XL', but I just get an error that the field 'new_shirtsize' doesn't exist for the entity 'salesorderdetail'.