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 用openEntityForm開啟新窗體傳lookup欄位時的注意事項ORM
- Dynamics CRM Connectivity and Firewall Port Requirements——CRM安裝UIREM
- Dynamics CRM Asynchronous Service Performance: Code ManiaORM
- Dynamics CRM 2013 批處理
- Dynamics CRM 使用ILMerge 合併CRM開發後的DLL
- Dynamics CRM 資料遷移工具DataMigrationUtility
- Dynamics CRM 用程式碼註冊Plugin StepPlugin
- Microsoft Dynamics CRM 4.0 安裝圖解教程ROS圖解
- Dynamics CRM 2013 常用JS指令碼JS指令碼
- 如何將Dynamics CRM 2016(on-premises)升級到Dynamics 365(on-premises)REM
- Dynamics CRM JavaScript API智慧提示(Visual Studio)JavaScriptAPI
- Dynamics CRM IFD部署如何更換SSL證書
- dynamics crm跳轉到手機版本的頁面
- Dynamics 365 Web API Set Values of all Data Types using Web API in Dynamics CRM Through C#WebAPIC#
- Dynamics CRM 如何使用命令列進行安裝命令列
- Dynamics CRM 為案例起源設定自定義圖示
- Dynamics CRM 365零基礎入門學習(一)Dynamics介紹以及開發工具配置
- Dynamics CRM Add/Remove a Tab in an entity form using plug-inREMORM
- Dynamics CRM CRM Reporting Error: Error occurred while fetching the data extension的解決方法ErrorWhile
- Dynamics CRM 圖表超出最大記錄限制的解決方法
- Dynamics CRM Developer Extensions提升你的開發效率(Plug-in篇)Developer
- Dynamics CRM Developer Extensions提升你的開發效率(web resource篇)DeveloperWeb
- Dynamics CRM 2016 404 error before any report runsError
- Dynamics CRM the field cannot be deleted because it is used in one or more process的解決方法delete
- Dynamics CRM Error- Creating Entity with an invalid parent. Entity: EmailErrorAI
- Dynamics CRM 介紹兩款Chrome元件,用於提升開發效率Chrome元件
- Dynamics CRM 子網格顯示篩選的實現(unsupported方法)
- Dynamics CRM 向檢視列新增自定義圖示和提示資訊
- Dynamics CRM 資料匯出到Excel時列標題不能重複Excel
- Dynamics CRM實體系列之1:N、N:1以及N:N關係
- Dynamics CRM Plug-in assembly does not contain the required types or assembly content cannot be...AIUI
- Dynamics CRM 如何使用XrmToolBox中的Bulk Workflow Execution批量更新資料
- JVM parametersJVM
- v$nls_parameters和nls_database_parametersDatabase
- There are 5 methods of index lookupIndex
- Dynamics CRM 如何獲取市場營銷列表下的動態成員
- Dynamics CRM2016 WebApi之alternate key的更新與刪除WebAPI
- JQuery Plugin 2 - Passing Options into Your PluginjQueryPlugin