MSCRM 获取列表所选记录相关信息

2018-06-17 21:28:46来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

问题:如何通过JS获取列表中所选记录信息?

解决办法:

The CRM2011 Ribbon has a special set of parameters called 'CrmParameters' that provide information about the current session such as the selected rows in a sub-grid. We can use the 'SelectedControlSelectedItemReferences' parameter to pass an array of selected items in the grid to our custom JavaScript function. Each object in the array contains the following fields:

Field Name Type Example
Id string {2D080FA6-8D18-E211-9DB7-000C299FFE7D}
Name string Some Account
TypeCode Number 1
TypeName string account

 

实例:

function run(selectedItems)
{
    var selectedItem = selectedItems[0];
    // Here you can use the information below to open a new window or whatever!
    alert("Id=" + selectedItem.Id + "\nName=" + selectedItem.Name + "\nTypeCode=" + selectedItem.TypeCode.toString() + "\nTypeName=" + selectedItem.TypeName);
}

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Hello, Android多屏幕版

下一篇:【基础】一个简单的MVC实例及故障排除