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

推荐订阅源

美团技术团队
罗磊的独立博客
SecWiki News
SecWiki News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
IT之家
IT之家
博客园 - 聂微东
T
The Exploit Database - CXSecurity.com
Recorded Future
Recorded Future
大猫的无限游戏
大猫的无限游戏
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Vercel News
Vercel News
G
GRAHAM CLULEY
D
DataBreaches.Net
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
SegmentFault 最新的问题
博客园_首页
雷峰网
雷峰网
T
Tenable Blog
Spread Privacy
Spread Privacy
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
Cisco Talos Blog
Cisco Talos Blog
V
Visual Studio Blog
J
Java Code Geeks
博客园 - Franky
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes
T
Threatpost
Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
Recent Announcements
Recent Announcements
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
U
Unit 42
M
MIT News - Artificial intelligence
Y
Y Combinator Blog
K
Kaspersky official blog
有赞技术团队
有赞技术团队
B
Blog
腾讯CDC

博客园 - Batistuta Cai

分享一本微软CRM2011标准功能介绍书籍 微软CRM 2011 新功能之四:审核 微软CRM 2011 新功能之三:可新增客户化活动类型实体 微软CRM4.0Plugin抛出异常信息实现换行功能 微软CRM 2011 Beta 新功能之二:不同组织不同基本语言 微软CRM 2011 Beta 新功能之一:全局选项集 微软CRM 2011 Beta Show 微软CRM 2011 Beta 发布了 微软CRM记录列表每页显示超过250个记录解决办法 微软CRM4.0表单Tab数量限制解决方法 在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.0自定义实体使用“查找地址”功能从客户自动带出地址信息
Batistuta Cai · 2010-08-10 · via 博客园 - Batistuta Cai

      在微软CRM4.0标准功能中报价单、订单、发票实体实现了“查找地址”功能,可以把报价单、订单、发票关联潜在客户的地址信息带到报价单、订单、发票的账单邮寄地址或者送货地址,避免手动重复录入,提高工作效率,功能如下图:

对于自定义实体,默认并不提供“查找地址”功能,我们可以通过客户化的方式来实现此功能。

步骤一、通过ISV.config增加 “查找地址”按钮,代码如下:

      <Entities>
        <Entity name="new_shipping">
          <ToolBar ValidForCreate="1" ValidForUpdate="1">
            <Button JavaScript="LookupAddress();" PassParams="1" WinMode="2">
              <Titles>
                <Title LCID="2052" Text="查找地址..." />
              </Titles>
              <ToolTips>
                <ToolTip LCID="2052" Text="查找地址..." />
              </ToolTips>
            </Button>
          </ToolBar>
        </Entity>
         .
         .
         .
         .
         .
         .

步骤二、在new_shipping的onload事件中 重写 LookupAddress()方法,代码如下:

window.LookupAddress = function()  
{
                var aoItems = crmForm.all.new_accountid.DataValue;
                if (IsNull(aoItems))
                {
                                alert("必须先提供订单顾客的值才能查找地址");
                                var sArg = crmForm.GetLabel(crmForm.all.new_accountid);
                                alert( formatString(LOCID_PROVIDE_VALUE_ADDRESS, sArg));
                                return;
                } 

                var o = openStdDlg(prependOrgName("/sfa/quotes/dlg_lookupaddress.aspx?headerForm=1&parentType=" + aoItems[0].type + "&parentId=" + aoItems[0].id + "&willCall=0"), "LookupAddress", 500, 330, true);
                if (o)
                {
                                SetBillTo(o);
                                SetShipTo(o, false, parseInt(crmFormSubmit.crmFormSubmitObjectType.value, 10));
                }
}

window.SetBillTo = function(o)
{
	with (crmForm)
	{
		if (o.BillTo)
		{
			new_billto_name.value                 = o.Address.Name;
			new_billto_line1.value                  = o.Address.Line1;
			new_billto_city.value                   = o.Address.City;
			new_billto_stateorprovince.value   = o.Address.StateOrProvince;
			new_billto_postalcode.value          = o.Address.PostalCode;
			new_billto_country.value              = o.Address.Country;
			new_billto_telephone.value           = o.Address.Telephone;
			new_billto_fax.value                    = o.Address.Fax;
			new_billto_contactname.value       = o.Address.ContactName;
		}
	}
}


window.SetShipTo = function(o, isDetail, iObjectType)
{
	with (crmForm.all)
	{
		if (o.ShipTo)
		{
			new_shipto_name.value                = o.Address.Name;
			new_shipto_line1.value                 = o.Address.Line1;
			new_shipto_city.value                  = o.Address.City;
			new_shipto_stateorprovince.value  = o.Address.StateOrProvince;
			new_shipto_postalcode.value         = o.Address.PostalCode;
			new_shipto_country.value             = o.Address.Country;
			new_shipto_telephone.value           = o.Address.Telephone;
			new_shipto_fax.value                    = o.Address.Fax;
			new_shipto_contactname.value       = o.Address.ContactName;
		}
	}
}

发布后功能如下图:

posted on 2010-08-10 17:56  Batistuta Cai  阅读(2024)  评论()    收藏  举报