I'm using the following ruby gem to connect to the MS Dynamics CRM API: https://github.com/TinderBox/dynamics_crm. I'm having trouble setting the value for any field that is an option set. Using the code below:
client.create('lead', firstname: firstName, lastname: lastName, description: description, emailaddress1: email, subject: topic,
companyname: company, telephone1: workPhone, telephone2: homePhone, mobilephone: mobilePhone, description: description,
parentcontactid: customer, customerid: customer, parentaccountid: parent, ownerid: team, campaignid: campaign, leadsourcecode: 4)
Everything works fine, except for the leadsourcecode. It returns an error saying incorrect attribute type int
. I discovered that there is a virtual attribute called name for option sets, so I tried replaceing leadsourcecode: 4
with leadsourcecodename: "Partner"
, and it completed without an error, but the value was not set in the CRM. Does anyone have any idea why the value would not be set?