1
我正在使用以下ruby gem連接到MS Dynamics CRM API:https://github.com/TinderBox/dynamics_crm。我無法爲設置選項的任何字段設置值。使用下面的代碼:如何在Dynamics CRM Online API中設置選項集值?
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)
一切工作正常,除了leadsourcecode。它返回一個錯誤,說incorrect attribute type int
。我發現有一個稱爲名稱的虛擬屬性用於選項集,所以我試圖用leadsourcecodename: "Partner"
取代leadsourcecode: 4
,並且它沒有錯誤地完成,但是沒有在CRM中設置該值。有誰知道爲什麼價值不會被設置?