Wednesday, May 14, 2014

Ribbondiffxml for Custom Button on Form, Home, Sub-Grid in MS CRM 2011 and MS CRM 2013

<RibbonDiffXml>
        <CustomActions>
          <CustomAction Id="alb.alb_aiscontract.Button1.Button.CustomAction" Location="Mscrm.Form.alb_aiscontract.MainTab.Save.Controls._children" Sequence="65">
            <CommandUIDefinition>
              <Button Command="alb.alb_aiscontract.Command0.Command" Id="alb.alb_aiscontract.Button1.Button" Image32by32="$webresource:alb_aiscontractImage32" Image16by16="$webresource:alb_aiscontractImage16" LabelText="$LocLabels:alb.alb_aiscontract.Button1.Button.LabelText" Sequence="65" TemplateAlias="o2" ToolTipTitle="$LocLabels:alb.alb_aiscontract.Button1.Button.ToolTipTitle" />
            </CommandUIDefinition>
          </CustomAction>
          <CustomAction Id="alb.alb_aiscontract.Button2.Button.CustomAction" Location="Mscrm.HomepageGrid.alb_aiscontract.MainTab.Management.Controls._children" Sequence="45">
            <CommandUIDefinition>
              <Button Command="alb.alb_aiscontract.Command1.Command" Id="alb.alb_aiscontract.Button2.Button" Image32by32="$webresource:alb_aiscontractImage32" Image16by16="$webresource:alb_aiscontractImage16" LabelText="$LocLabels:alb.alb_aiscontract.Button2.Button.LabelText" Sequence="45" TemplateAlias="o2" ToolTipTitle="$LocLabels:alb.alb_aiscontract.Button2.Button.ToolTipTitle" />
            </CommandUIDefinition>
          </CustomAction>
          <CustomAction Id="alb.alb_aiscontract.Button3.Button.CustomAction" Location="Mscrm.SubGrid.alb_aiscontract.MainTab.Management.Controls._children" Sequence="45">
            <CommandUIDefinition>
              <Button Command="alb.alb_aiscontract.Command1.Command" Id="alb.alb_aiscontract.Button3.Button" Image32by32="$webresource:alb_aiscontractImage32" Image16by16="$webresource:alb_aiscontractImage16" LabelText="$LocLabels:alb.alb_aiscontract.Button3.Button.LabelText" Sequence="45" TemplateAlias="o1" ToolTipTitle="$LocLabels:alb.alb_aiscontract.Button3.Button.ToolTipTitle" />
            </CommandUIDefinition>
          </CustomAction>
        </CustomActions>
        <Templates>
          <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
        </Templates>
        <CommandDefinitions>
          <CommandDefinition Id="alb.alb_aiscontract.Command0.Command">
            <EnableRules />
            <DisplayRules>
              <DisplayRule Id="alb.alb_aiscontract.DisplayRule0.DisplayRule" />
            </DisplayRules>
            <Actions>
              <JavaScriptFunction FunctionName="CreateAISContractVersion" Library="$webresource:alb_aiscontract">
                <CrmParameter Value="FirstPrimaryItemId" />
              </JavaScriptFunction>
            </Actions>
          </CommandDefinition>
          <CommandDefinition Id="alb.alb_aiscontract.Command1.Command">
            <EnableRules>
              <EnableRule Id="alb.alb_aiscontract.EnableRule0.EnableRule" />
            </EnableRules>
            <DisplayRules />
            <Actions>
              <JavaScriptFunction FunctionName="CreateAISContractVersion" Library="$webresource:alb_aiscontract">
                <CrmParameter Value="SelectedControlSelectedItemIds" />
              </JavaScriptFunction>
            </Actions>
          </CommandDefinition>
        </CommandDefinitions>
        <RuleDefinitions>
          <TabDisplayRules />
          <DisplayRules>
            <DisplayRule Id="alb.alb_aiscontract.DisplayRule0.DisplayRule">
              <FormStateRule State="Create" InvertResult="true" />
            </DisplayRule>
          </DisplayRules>
          <EnableRules>
            <EnableRule Id="alb.alb_aiscontract.EnableRule0.EnableRule">
              <SelectionCountRule AppliesTo="SelectedEntity" Minimum="1" Maximum="1" />
            </EnableRule>
          </EnableRules>
        </RuleDefinitions>
        <LocLabels>
          <LocLabel Id="alb.alb_aiscontract.Button1.Button.LabelText">
            <Titles>
              <Title description="Create Version" languagecode="1033" />
            </Titles>
          </LocLabel>
          <LocLabel Id="alb.alb_aiscontract.Button1.Button.ToolTipTitle">
            <Titles>
              <Title description="Create Version" languagecode="1033" />
            </Titles>
          </LocLabel>
          <LocLabel Id="alb.alb_aiscontract.Button2.Button.LabelText">
            <Titles>
              <Title description="Create Version" languagecode="1033" />
            </Titles>
          </LocLabel>
          <LocLabel Id="alb.alb_aiscontract.Button2.Button.ToolTipTitle">
            <Titles>
              <Title description="Create Version" languagecode="1033" />
            </Titles>
          </LocLabel>
          <LocLabel Id="alb.alb_aiscontract.Button3.Button.LabelText">
            <Titles>
              <Title description="Create Version" languagecode="1033" />
            </Titles>
          </LocLabel>
          <LocLabel Id="alb.alb_aiscontract.Button3.Button.ToolTipTitle">
            <Titles>
              <Title description="Create Version" languagecode="1033" />
            </Titles>
          </LocLabel>
        </LocLabels>
      </RibbonDiffXml>

No comments:

Split the String values with a special character in MS Flow to convert this into Array

 Many times we have a requirement to prepare the Mailing address for some of the documents, suppose there are Address Line1, Address Line2, ...