在dynamics crm中自定义一个控件

发布于 2024-09-30 10:20:55 字数 325 浏览 5 评论 0原文

我已经编写了可以让电话通过函数调用拨打号码的代码,这已经完成并除尘了。

我想要实现的是将拨号按钮添加到 Dynamics CRM 表单上的每个电话号码字段。最终,这还可以创建一个新的电话记录,填写基本详细信息,并将其显示给用户输入注释和电话结果,也许还有一些其他工作流程位来安排下一次通话。

我可以在标准表单上放置一个自定义控件来代替标准控件吗?我假设它必须是一个 asp.net 页面的 IFrame,它提取记录 id 和字段名称,查找要在文本框中显示的号码,并将号码传递给 DialNumber 函数。嘿,快点...

我想这不会那么容易...以前有人尝试过吗,过程是什么,有什么问题?

I've written code that can make a phone dial a number from a function call, that's done and dusted.

What I would like to achieve is adding a Dial button to each phone number field on the forms in Dynamics CRM. Eventually this could also create a new phone record fill in the basic details and show it to the user to enter notes and an outcome for the phone call, and perhaps some other workflow bits to schedule the next call.

Can I put a custom control on a standard form in place of the standard control. I'm assuming it would have to be an IFrame to an asp.net page, that pulls in the record id, and the field name, looks up the number to show in a text box, and passes the number to the DialNumber function. Hey presto...

I assume its not going to be that easy... Has anyone tried this before, what's the process, what are the gotchas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江湖正好 2024-10-07 10:20:55

我通过在电话字段上放置一些 html(div 和锚点)解决了这个问题。下面的代码在给定字段的文本框末尾放置一个电话图标。

crmForm.ApplyClickToDial= function(field, href){
var phoneField = field;
phoneField.style.position = "relative";

var imgAnchor = document.createElement("a");
phoneField.appendChild(imgAnchor);

imgAnchor.href=href;
imgAnchor.style.position = "absolute";
imgAnchor.style.right = ".5em";
imgAnchor.style.top=".5em";

var image = document.createElement("img");
image.src ="/_imgs/ico_16_4210.gif";
imgAnchor.appendChild(image);
}

var mobileNumber = crmForm.all.mobilephone.DataValue;
crmForm.ApplyClickToDial(crmForm.all.mobilephone_d, "http://callphone/" + mobileNumber );  /*  the "_d"  represents the control's encompassing td element*/

I solved this very problem by putting some html(divs and anchors) over the telephone fields. The below code puts a phone icon on the end of the textbox for the given field.

crmForm.ApplyClickToDial= function(field, href){
var phoneField = field;
phoneField.style.position = "relative";

var imgAnchor = document.createElement("a");
phoneField.appendChild(imgAnchor);

imgAnchor.href=href;
imgAnchor.style.position = "absolute";
imgAnchor.style.right = ".5em";
imgAnchor.style.top=".5em";

var image = document.createElement("img");
image.src ="/_imgs/ico_16_4210.gif";
imgAnchor.appendChild(image);
}

var mobileNumber = crmForm.all.mobilephone.DataValue;
crmForm.ApplyClickToDial(crmForm.all.mobilephone_d, "http://callphone/" + mobileNumber );  /*  the "_d"  represents the control's encompassing td element*/
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文