I use the following gem to connect to Microsoft Dyanmics CRM: https://github.com/TinderBox/dynamics_crm . I was able to connect and add contacts, links and several other things just fine. My problem is that I cannot figure out how to add order and order information. Here is the code that I use 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 is normal, but when I check the CRM server, there is no entry in the "Order Details" section. I also canβt understand how to send custom fields, I tried "new_shirtsize" => "XL", but I just got an error message that the "new_shirtsize" field does not exist for the salesorderdetail object.
source share