1 回答

TA貢獻1777條經驗 獲得超3個贊
因此,設法使用github上的 David Yack API 包裝器解決了這個問題,并發布了我的發現,以防萬一有人偶然發現這篇文章。他們的關鍵是使用字典,就好像它是 Microsoft SDK 中的 EntityReference 類一樣,并使用“@odata.type”作為實體類型,實體 ID 全部小寫,如下所示:
dynamic AccountRef = new Dictionary<String, object>();
AccountRef["@odata.type"] = "Microsoft.Dynamics.CRM.account";
AccountRef["accountid"] = AccountId.ToString();
dynamic CurrencyRef = new Dictionary<String, object>();
CurrencyRef["@odata.type"] = "Microsoft.Dynamics.CRM.transactioncurrency";
CurrencyRef["transactioncurrencyid"] = CurrencyId.ToString();
var actionParams = new
{
Account = AccountRef,
Currency = CurrencyRef,
Qty = 1.00m
};
var response = await _crmClient.API.ExecuteAction("Microsoft.Dynamics.CRM.new_GetProductBuyPrice", "products", ProductId, actionParams);
- 1 回答
- 0 關注
- 131 瀏覽
添加回答
舉報