惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
Vulnerabilities – Threatpost
Cloudbric
Cloudbric
G
GRAHAM CLULEY
S
Securelist
Schneier on Security
Schneier on Security
Help Net Security
Help Net Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Project Zero
Project Zero
Spread Privacy
Spread Privacy
P
Privacy International News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
T
Tailwind CSS Blog
博客园_首页
有赞技术团队
有赞技术团队
Simon Willison's Weblog
Simon Willison's Weblog
Stack Overflow Blog
Stack Overflow Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Latest news
Latest news
T
Tor Project blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Attack and Defense Labs
Attack and Defense Labs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
O
OpenAI News
J
Java Code Geeks
T
Tenable Blog
K
Kaspersky official blog
AWS News Blog
AWS News Blog
S
Security @ Cisco Blogs
The GitHub Blog
The GitHub Blog
T
Threatpost
月光博客
月光博客
H
Heimdal Security Blog
Security Latest
Security Latest
The Hacker News
The Hacker News
Y
Y Combinator Blog
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
C
Cisco Blogs
美团技术团队
Microsoft Security Blog
Microsoft Security Blog
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
C
CERT Recently Published Vulnerability Notes
D
Docker
Google Online Security Blog
Google Online Security Blog
D
DataBreaches.Net
V
Visual Studio Blog
H
Help Net Security

博客园 - Batistuta Cai

分享一本微软CRM2011标准功能介绍书籍 微软CRM 2011 新功能之四:审核 微软CRM 2011 新功能之三:可新增客户化活动类型实体 微软CRM 2011 Beta 新功能之二:不同组织不同基本语言 微软CRM 2011 Beta 新功能之一:全局选项集 微软CRM 2011 Beta Show 微软CRM 2011 Beta 发布了 微软CRM记录列表每页显示超过250个记录解决办法 微软CRM4.0表单Tab数量限制解决方法 微软CRM4.0自定义实体使用“查找地址”功能从客户自动带出地址信息 在Microsoft SQL Server 2008环境下安装mscrm4.0报“The specified path is not a metabase path”错误解决方法 - Batistuta Cai 开始Silverlight之旅--建立Silverlight开发环境 微软CRM打上rollup3补丁后导致工作流无法发布问题解决方法 微软CRM 中文技术支持部博客 Reporting Service 在文本框中换行的问题 报价单转订单时把报价单产品客户化属性映射到订单产品客户化属性 MSCRM4.0商机移除价目表引起的问题 - Batistuta Cai - 博客园 MSCRM4.0删除Money类型属性可能引起的问题 - Batistuta Cai - 博客园 MSCRM调用外部JS文件 - Batistuta Cai - 博客园
微软CRM4.0Plugin抛出异常信息实现换行功能
Batistuta Cai · 2010-10-14 · via 博客园 - Batistuta Cai

    Plugin通过InvalidPluginExecutionException抛出的异常如果包含的信息太多,会给微软CRM4.0用户带来不好的界面体验,如果可以实现换行功能,那效果会好很多,遗憾的是通过support客户化无法实现换行,但是可以通过unsupport客户化方法来实现,在unsupport客户化前请备份好修改到的文件。
步骤如下:
1、打开 /CRMWeb/_common/error/dlg_error.aspx文件
2、增加javascript 函数,代码如下:

function HTMLMessage()
{ 
       var ErrorMessage = document.getElementById("ErrorMessage");  
       ErrorMessage.innerHTML = ErrorMessage.innerText; 
}

3、在onload事件中调用HTMLMessage函数,代码如下:

<body onload="HTMLMessage()">

4、保存
5、新建一个Plugin,抛出一个异常,并显示HTML格式消息,代码如下:

using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.Crm.Sdk;
using Microsoft.Crm.Sdk.Query;
using Microsoft.Crm.SdkTypeProxy;

namespace HtmlMessagePluginException
{
        public class PluginException : IPlugin
        {
                public void Execute(IPluginExecutionContext context)
                {
                    throw new InvalidPluginExecutionException("<strong style=\"font-size:16px;color:#0067c6;\">提供支持HTML的异常信息</strong> <BR> <strong style=\"font-size:16px;color:#0067c6;\">很好很强大!</strong>");
                }
        }
}

6、注册到微软CRM4.0

7、运行结果如下图:

posted on 2010-10-14 17:55  Batistuta Cai  阅读(1108)  评论()    收藏  举报