如果「查找」下拉菜單中包含多個項目(例如,帳戶,聯繫人),可以將默認選項(在我的方案中設置爲第二個選項) )?默認查找視圖中的「查找」字段
回答
function Form_OnLoad()
...
preFilterLookup();
..
}
function preFilterLookup() {
Xrm.Page.getControl("customerid").addPreSearch(addLookupFilter);
}
function addLookupFilter() {
document.getElementById("customerid_i").setAttribute ("lookuptypenames", "contact:2:Contact");
document.getElementById("customerid_i").setAttribute("lookuptypes", "2");
}
How do I change the default quick form for the CustomerId field in Dynamics CRM 2013?
該代碼不適用於CRM 2015 SP1/2016。升級祝你好運。 –
如果確實需要處理這個問題,你應該有一個OnChange js請求記錄類型,如果它不匹配清除查找的值。 – Sxntk
@AndriiButenko公平,問題被標記爲2013年,所以這個答案應該在這種環境下工作。使用不支持的代碼在以後的版本中被棄用是不好的做法 –
在CRM 2015年,如果你要篩選的查找,你可以使用下面因此它僅包含聯繫人
// Filter the dropdown of the lookup so that it only contains contacts + do not allow accounts ,in the contact views, visible when the user clicks more records
var noAccountsfilter = "<filter type='and'><condition attribute='statecode' operator='ne' value='0' /></filter>";
Xrm.Page.getControl("parentcustomerid").addCustomFilter(noAccountsfilter, 'account');
- 1. MVC默認查找特定視圖
- 2. 查找字段中
- 3. 查找字段的字段
- 4. 在頁面刷新後查找字段的默認值
- 5. 如何在片段中查找視圖?
- 6. 查找默認AlertDialog的背景視圖參考
- 7. 將默認主要必填字段設置爲查找
- 8. 在GTK中查找默認快捷鍵
- 9. 在wpf中查找默認樣式?
- 10. 在VB.net中查找默認瀏覽器
- 11. Cakephp查找字段
- 12. html查找字段
- 13. 查找有關Drupal視圖中的字段的信息
- 14. 在Access中查找字段
- 15. 查找根視圖
- 16. 在Android中查找視圖
- 17. 查找默認的本地Jupyter目錄
- 18. 設置SharePoint查找列的默認值
- 19. 從查詢/查看字段中查找底層字段
- 20. MongoDB在被引用對象中的字段查找/查找
- 21. 如何在Drupal 7中查找視圖字段變量名稱
- 22. 查找Jenkins Jenkins的視圖
- 23. 查找默認的階段,一個Maven插件結合
- 24. emacs「查找文件:」默認路徑
- 25. 查找默認WPF主題文件
- 26. SQL查詢 - 查找重複的字段
- 27. Wordpress CUstom字段管理視圖中的默認字段
- 28. 從python中嵌套字典查找返回默認值
- 29. 給定QS字段查找鍵,如何在連接中查找字段類型?
- 30. 在Nativescript中何處查找默認系統圖標?
https://bingsoft.wordpress.com/2011/ 01/13/default-customer-lookup-to-contact-in-crm-2011/ –
搜索「是否可以設置默認選項CRM查找」會產生許多結果,包括上述評論中添加的結果。請在提問前嘗試表明您已經做了一些調查。 – AdamV
感謝您的幫助。我在用我認爲是錯誤的詞語進行搜索。 – MightyAtom