Im CRM 2011 是否可以从 javascript 代码中获取实体的图标 url?
谢谢
这可能是一个返回任何图标 url 的函数:
function GetIconUrl (etc) {
/// <summary>
/// Get the url of the 16x16 icon for the specified entity
/// </summary>
/// <param name="etc" type="Number">Entity type code of the entity which icon must be retrieved.</param>
/// <returns type="String">Url of the icon.The path is relative to the application root.</returns>
var url;
if (etc >= 10000) {
// return a custom entity icon
url = "/_Common/icon.aspx?objectTypeCode=" + etc + "&iconType=GridIcon&inProduction=1&cache=1";
} else {
// return a system entity icon
url = "/_imgs/ico_16_" + etc + ".gif";
}
return url;
}