根据实体类型重定向到 CRM 4.0 中的另一个表单

发布于 2024-12-09 11:26:07 字数 299 浏览 3 评论 0原文

在 CRM 4.0 中,如何在双击视图网格中的记录(当它以编辑表单打开时)检查记录的类型属性并通过传递共享 ID 重定向到另一个实体的编辑页面(取决于类型)称为文档 ID 的属性?

这就是我想要实现的目标 - 我有一个名为 Transaction 的主要实体,但它是抽象类型,并且它本身不可编辑 - 就像 CRM 中的活动一样。有特定类型的交易实体,例如客户定价 - 这些实体是可编辑的(例如活动中名为传真或电子邮件的实体)。称为“事务”的实体与其子类型共享许多公共属性,其中包括一个称为“文档 ID”的属性。当双击交易记录时,我需要将用户重定向到相应实体的编辑页面。

In CRM 4.0, how can I, upon double-clicking on a record in the view grid (when it opens in edit form), check the record's Type attribute and redirect to another entity's edit page (depending on type) by passing a shared ID attribute called Document ID?

This is what I'm trying to accomplish - I have a main entity called Transaction, but it's the abstract type and by itself it is not editable - like Activities in CRM. There are specific types of Transaction entities such as Customer Pricing - these entities ARE editable (like the entity named Fax or Email in Activities). The entity called Transaction shares a number of common attributes with its sub types, including one called Document ID. When double-clicking on a Transaction record, I need to redirect the user to the corresponding entity's edit page.

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

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

发布评论

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

评论(1

沧笙踏歌 2024-12-16 11:26:07

如果我理解正确的话,您可以通过在表单的 OnLoad 事件上运行的一些 javascript 来完成此操作。

我的理解:

  • 用户单击“交易”实体实体表单加载
  • 在该实体的屏幕上有两个字段:
    • 一个名为“文档 ID”的字段,用于保存子类型的 ID
    • 另一个名为“文档 ID 类型”的字段,用于保存子类型的 ObjectTypeCode

我的 CRM4 有点模糊,因为我最近一直在使用 CRM2011,但是像这样的东西会起作用。

function OnLoad {
    //let's look for the type field
    var typeValue = crmForm.all.new_documentid.Value;
    var typeObjectTypeCode = crmForm.all.new_documentidtypecode.Value;
    var url = window.location.protocol + '//' + window.location.host + '/';
    url = url + 'userdefined/edit.aspx?etc=' + typeObjectTypecode + '&id=' + typeValue;

    var newWindowHandle = window.open(url);

    //optionally close this window
    window.top.close();
}

用于打开自定义实体的 URL,取自此处

If I understand this correctly you could do this via some javascript that runs on the form's OnLoad event.

My understanding:

  • User clicks on 'Transaction' entity Entity form loads
  • On the screen for that entity there are two fields:
    • one field called 'Document ID' which holds the Id of the sub type
    • another field called 'Document ID Type' which holds the ObjectTypeCode of the sub type

My CRM4 is a bit hazy as I have been working with CRM2011 recently but something like this would work.

function OnLoad {
    //let's look for the type field
    var typeValue = crmForm.all.new_documentid.Value;
    var typeObjectTypeCode = crmForm.all.new_documentidtypecode.Value;
    var url = window.location.protocol + '//' + window.location.host + '/';
    url = url + 'userdefined/edit.aspx?etc=' + typeObjectTypecode + '&id=' + typeValue;

    var newWindowHandle = window.open(url);

    //optionally close this window
    window.top.close();
}

URLs to open custom entities taken from here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文