首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Dynamics CRM,功能区按钮,添加链接的子实体

Dynamics CRM,功能区按钮,添加链接的子实体
EN

Stack Overflow用户
提问于 2012-07-06 23:44:52
回答 2查看 895关注 0票数 0

我正在尝试向联系人表单添加一个按钮,该按钮创建一个链接到父联系人的子活动记录。

我正在使用Ribbon Workbench来尝试此操作。我已经成功地显示了按钮,但是我无法创建子记录。Ribbon Workbench不会发布以下xml

到目前为止,我拥有的XML是:

代码语言:javascript
复制
    <?xml version="1.0" encoding="utf-16"?>
<RibbonDiffXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CustomActions>
    <CustomAction Id="new.contact.Button1.Button.CustomAction" Location="Mscrm.Form.contact.MainTab.Actions.Controls._children" Sequence="19">
      <CommandUIDefinition>
        <Button Command="new.contact.Command0.Command" Description="Send SMS" Id="new.contact.Button1.Button" Image32by32="$webresource:new_sms32" Image16by16="$webresource:new_sms16" LabelText="$LocLabels:new.contact.Button1.Button.LabelText" Sequence="19" TemplateAlias="o1" ToolTipTitle="$LocLabels:new.contact.Button1.Button.ToolTipTitle"     ToolTipDescription="$LocLabels:new.contact.Button1.Button.ToolTipDescription" />
      </CommandUIDefinition>
    </CustomAction>
  </CustomActions>
  <Templates>
    <RibbonTemplates Id="Mscrm.Templates" />
  </Templates>
  <CommandDefinitions>
    <CommandDefinition Id="new.contact.Command0.Command">
      <EnableRules />
      <DisplayRules />
      <Actions>
        <JavaScriptFunction FunctionName="AddSMS" Library="$webresource:new_WFTrigger">
          <StringParameter Name="child" Value="new_sms" />
          <CrmParameter Name="parentRecordId" Value="PrimaryItemIds" />
          <CrmParameter Name="parente" Value="PrimaryEntityTypeCode" /> <!--The ribbon workbench refuses to fill the Name of this parameter and tries to publish it as blank -->
        </JavaScriptFunction>
          </Actions>
    </CommandDefinition>
  </CommandDefinitions>
  <RuleDefinitions>
    <TabDisplayRules />
        <DisplayRules />
    <EnableRules />
  </RuleDefinitions>
  <LocLabels>
    <LocLabel Id="new.contact.Button1.Button.LabelText">
      <Titles>
        <Title description="Send SMS" languagecode="1033" />
      </Titles>
    </LocLabel>
    <LocLabel Id="new.contact.Button1.Button.ToolTipTitle">
      <Titles>
        <Title description="Send SMS" languagecode="1033" />
      </Titles>
    </LocLabel>
    <LocLabel Id="new.contact.Button1.Button.ToolTipDescription">
      <Titles>
        <Title description="Send SMS" languagecode="1033" />
      </Titles>
    </LocLabel>
  </LocLabels>
</RibbonDiffXml>

我拥有的javascript web资源是:

代码语言:javascript
复制
function AddSMS(child, parente, parentRecordId) {
    var url = Xrm.Page.context.getServerUrl() + "main.aspx?etn= " + child + " &extraqs=%3f_CreateFromId%3d" + parentRecordId + "%26_CreateFromType%3d" + parente + "%26etn%" + child + " &pagetype=entityrecord";
open(url, 'Create SMS');
}

更新:在我的环境中出现了一个问题,所以我创建了一个新的组织来开发cusomtisations。当我回到相同的点时,我会回到这个线程。谢谢!

EN

回答 2

Stack Overflow用户

发布于 2012-07-07 01:22:16

导入屏幕的最后一页上应该有一个错误,可以帮助您推断问题。我花了一段时间才意识到错误日志甚至在那个页面上。如果我没记错的话,它看起来像一个超链接。

你能在那个错误日志中发布错误消息吗?

票数 0
EN

Stack Overflow用户

发布于 2012-07-10 18:02:35

Ribbon Workbench不会发布JavaScriptFunction参数的'Name‘属性,因为它们只在向Url操作添加参数时使用-所以我不认为问题与此有关。

你得到了什么错误?也许你可能会超时--你是在发布到Dynamics CRM Online吗?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11365473

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档