見積エンティティ フォームのリボンにカスタム ボタンを追加しました。ボタンは表示され、見積もりが下書き状態のときに期待どおりに機能します。
[Activate Quote] ボタンをクリックすると、見積もりがアクティブになります。この操作により、リボンも更新されます。リボンを更新した後、リボンに追加したカスタム ボタンが表示されなくなりました。
リボン ワークベンチをチェックインしましたが、追加したカスタム ボタンに表示ルールが定義されていないため、[見積の有効化] で非表示になる可能性があります。
この動作を引き起こす可能性のあるカスタム スクリプトもチェックしましたが、カスタム ボタンを非表示にするスクリプトは見つかりませんでした。
カスタム ボタンをリボンの別のグループに追加しようとしましたが、それも役に立たないようです。
見積がアクティブ化されると、リボンは見積エンティティ フォームに事前定義された一連のコントロールのみを表示するようです。この問題を回避する方法について何か提案はありますか?
以下は、quote エンティティの ribbondiffxml です。追加したカスタムボタンは「コピー見積もり」と「新バージョン」
<?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="Sol.Form.Estimate.CopyEntity.Button.CustomAction" Location="Mscrm.Form.quote.MainTab.Actions.Controls._children" Sequence="4">
<CommandUIDefinition>
<Button Alt="$LocLabels:Sol.Form.Estimate.CopyEntity.Button.Alt" Command="Sol.Form.Estimate.CopyEntity.Command" Description="Copy Estimate" Id="Sol.Form.Estimate.CopyEntity.Button" Image32by32="$webresource:mcace_EntityRibbon_32x32.png" Image16by16="$webresource:mcace_EntityRibbon_16x16.png" LabelText="$LocLabels:Sol.Form.Estimate.CopyEntity.Button.LabelText" Sequence="4" TemplateAlias="o1" ToolTipTitle="$LocLabels:Sol.Form.Estimate.CopyEntity.Button.ToolTipTitle" ToolTipDescription="$LocLabels:Sol.Form.Estimate.CopyEntity.Button.ToolTipDescription" />
</CommandUIDefinition>
</CustomAction>
<CustomAction Id="Sol.Form.Estimate.NewVersion.Button.CustomAction" Location="Mscrm.Form.quote.MainTab.Actions.Controls._children" Sequence="4">
<CommandUIDefinition>
<Button Alt="$LocLabels:Sol.Form.Estimate.NewVersion.Button.Alt" Command="Sol.quote.Estimate.NewVersion.Command" Description="New Version" Id="Sol.Form.Estimate.NewVersion.Button" Image32by32="/_imgs/SFA/ReviseQuote_32.png" Image16by16="/_imgs/SFA/ReviseQuote_16.png" LabelText="$LocLabels:Sol.Form.Estimate.NewVersion.Button.LabelText" Sequence="4" TemplateAlias="o1" ToolTipTitle="$LocLabels:Sol.Form.Estimate.NewVersion.Button.ToolTipTitle" ToolTipDescription="$LocLabels:Sol.Form.Estimate.NewVersion.Button.ToolTipDescription" />
</CommandUIDefinition>
</CustomAction>
<HideCustomAction HideActionId="Sol.Mscrm.Form.quote.ReviseQuote.Hide" Location="Mscrm.Form.quote.ReviseQuote" />
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates" />
</Templates>
<CommandDefinitions>
<CommandDefinition Id="Sol.Form.Estimate.CopyEntity.Command">
<EnableRules>
<EnableRule Id="Sol.Form.Estimate.CopyEntity.EnableRule" />
</EnableRules>
<DisplayRules />
<Actions>
<JavaScriptFunction FunctionName="triggerCopyEntity" Library="$webresource:sol_Entity_Ribbon.js" />
</Actions>
</CommandDefinition>
<CommandDefinition Id="Sol.quote.Estimate.NewVersion.Command">
<EnableRules>
<EnableRule Id="Sol.Form.Estimate.CopyEntity.EnableRule" />
</EnableRules>
<DisplayRules />
<Actions>
<JavaScriptFunction FunctionName="setIsNewVersionField" Library="$webresource:sol_Estimate_ribbon" />
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="Sol.Form.Estimate.DisplayRule.DisplayRule">
<CrmClientTypeRule Type="Web" Default="true" />
</DisplayRule>
</DisplayRules>
<EnableRules>
<EnableRule Id="Sol.Form.Estimate.CopyEntity.EnableRule">
<FormStateRule State="Existing" Default="false" InvertResult="false" />
</EnableRule>
</EnableRules>
</RuleDefinitions>
<LocLabels>
<LocLabel Id="Sol.Form.Estimate.CopyEntity.Button.LabelText">
<Titles>
<Title description="Copy Estimate" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="Sol.Form.Estimate.CopyEntity.Button.ToolTipTitle">
<Titles>
<Title description="Copy Estimate" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="Sol.Form.Estimate.CopyEntity.Button.ToolTipDescription">
<Titles>
<Title description="Copy Estimate" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="Sol.Form.Estimate.CopyEntity.Button.Alt">
<Titles>
<Title description="Copy Estimate" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="Sol.Form.Estimate.NewVersion.Button.LabelText">
<Titles>
<Title description="New Version" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="Sol.Form.Estimate.NewVersion.Button.ToolTipTitle">
<Titles>
<Title description="New Version" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="Sol.Form.Estimate.NewVersion.Button.ToolTipDescription">
<Titles>
<Title description="New Version" languagecode="1033" />
</Titles>
</LocLabel>
<LocLabel Id="Sol.Form.Estimate.NewVersion.Button.Alt">
<Titles>
<Title description="New Version" languagecode="1033" />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>