親連絡先にリンクされた子アクティビティ レコードを作成するボタンを連絡先フォームに追加しようとしています。
これを試みるためにリボン ワークベンチを使用しています。ボタンは正常に表示されましたが、子レコードを作成できません。リボン ワークベンチは以下の xml を公開しません
私がこれまでに持っているXMLは次のとおりです。
<?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 リソースは次のとおりです。
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');
}
更新: 私の環境で問題が発生したため、カスタマイズを開発するために新しい組織を開始しました。同じポイントに戻ったら、このスレッドに戻ります。ありがとう!