Dynamics CRM Xrm.Utility.openEntityForm passing lookup parameters
關於 openEntityForm如何傳lookup值, 官方的文件裡是這麼寫的
function OpenNewContact() {
var parameters = {};
//Set the Parent Customer field value to “Contoso”.
parameters["parentcustomerid"] = "2878282E-94D6-E111-9B1D-00155D9D700B";
parameters["parentcustomeridname"] = "Contoso";
parameters["parentcustomeridtype"] = "account";
//Set the Address Type to “Primary”.
parameters["address1_addresstypecode"] = "3";
//Set text in the Description field.
parameters["description"] = "Default values for this record were set programmatically.";
//Set Do not allow E-mails to "Do Not Allow".
parameters["donotemail"] = "1";
// Open the window.
Xrm.Utility.openEntityForm("contact", null, parameters);
}
但按照它這樣寫是報錯的,最後發現把type欄位去掉就可以了,即只賦值id和name值而不需要賦值type
var loanerrequestitem = new Object();
loanerrequestitem["dib_loaner_inventory"] = val.attributes["data-id"].value;
loanerrequestitem["dib_loaner_inventoryname"] = val.attributes["data-sn"].value;
loanerrequestitem["dib_loaner_model"] = val.attributes["data-model"].value;
loanerrequestitem["dib_loaner_modelname"] = val.attributes["data-model-name"].value;
loanerrequestitem["dib_loaner_request"] = loanerRequestId.replace('{', '').replace('}', '');
loanerrequestitem["dib_loaner_requestname"] = parent.Xrm.Page.getAttribute("mdt_loaner_request_no").getValue();
Xrm.Utility.openEntityForm("mdt_loanerrequestitem", null, loanerrequestitem, { openInNewWindow: true });
相關文章
- Dynamics CRM Performance Issue when CRM Forms OpeningORM
- Dynamics CRM Connectivity and Firewall Port Requirements——CRM安裝UIREM
- Dynamics CRM 2013 批處理
- Dynamics CRM 2013 常用JS指令碼JS指令碼
- Dynamics CRM實體系列之窗體
- 如何將Dynamics CRM 2016(on-premises)升級到Dynamics 365(on-premises)REM
- Dynamics CRM 使用ILMerge 合併CRM開發後的DLL
- Dynamics CRM 資料遷移工具DataMigrationUtility
- Dynamics CRM JavaScript API智慧提示(Visual Studio)JavaScriptAPI
- Dynamics CRM實體系列之檢視
- Dynamics CRM實體系列之圖表
- Dynamics CRM 用程式碼註冊Plugin StepPlugin
- Dynamics CRM 2016 404 error before any report runsError
- Dynamics 365 Web API Set Values of all Data Types using Web API in Dynamics CRM Through C#WebAPIC#
- VSCode JavaScript snippets for Dynamics 365/CRM 2011/2013/2015/2016VSCodeJavaScript
- Dynamics CRM IFD部署如何更換SSL證書
- dynamics crm跳轉到手機版本的頁面
- Dynamics CRM CRM Reporting Error: Error occurred while fetching the data extension的解決方法ErrorWhile
- Dynamics CRM 如何使用命令列進行安裝命令列
- Dynamics CRM 為案例起源設定自定義圖示
- Dynamics CRM Error- Creating Entity with an invalid parent. Entity: EmailErrorAI
- Dynamics CRM 365零基礎入門學習(一)Dynamics介紹以及開發工具配置
- Microsoft Dynamics CRM 2011 Administration Bible.pdf 免費下載ROS
- Dynamics CRM Plug-in assembly does not contain the required types or assembly content cannot be...AIUI
- Dynamics CRM 圖表超出最大記錄限制的解決方法
- Dynamics CRM 介紹兩款Chrome元件,用於提升開發效率Chrome元件
- Dynamics CRM the field cannot be deleted because it is used in one or more process的解決方法delete
- Dynamics CRM 子網格顯示篩選的實現(unsupported方法)
- Dynamics CRM 資料匯出到Excel時列標題不能重複Excel
- Dynamics CRM 如何使用XrmToolBox中的Bulk Workflow Execution批量更新資料
- Serial number lookup for Panasonic
- JQuery Plugin 2 - Passing Options into Your PluginjQueryPlugin
- TypeError: object() takes no parametersErrorObject
- Dynamics 365 基於ADFS 2016(4.0)的OAuth2 CRM Web API RequestOAuthWebAPI
- Dynamics CRM 向檢視列新增自定義圖示和提示資訊
- Dynamics CRM實體系列之1:N、N:1以及N:N關係
- zend_lookup_class_ex
- Paimon lookup store 實現AI