locked
Custom button returns error in CFO but works fine in Web client RRS feed

  • Question

  • Environment: MS-CRM 2013, UR2 on premisis; MS-Outlook 2010

    We have some customer buttons, which works as intended in the Web client, but gives a syntax error in CFO (online as well as offline).

    Example:
    Ribbondiffxml:

          <RibbonDiffXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
              <CustomAction Id="hdm.account.ContactReport.Button.CustomAction" Location="Mscrm.Form.account.MainTab.Save.Controls._children" Sequence="41">
                <CommandUIDefinition>
                  <Button Alt="$LocLabels:hdm.account.ContactReport.Button.Alt" Command="hdm.account.NewContactReport.Command" Description="Create a new Contact Report" Id="hdm.account.ContactReport.Button" Image32by32="$webresource:IconHdm_tripreportLarge" Image16by16="$webresource:IconHdm_tripreportSmall" LabelText="$LocLabels:hdm.account.ContactReport.Button.LabelText" Sequence="41" TemplateAlias="o1" ToolTipTitle="$LocLabels:hdm.account.ContactReport.Button.ToolTipTitle" ToolTipDescription="$LocLabels:hdm.account.ContactReport.Button.ToolTipDescription" />
                </CommandUIDefinition>
              </CustomAction>
              <HideCustomAction HideActionId="hdm.Mscrm.Form.account.AddConnection.Hide" Location="Mscrm.Form.account.AddConnection" />
              <HideCustomAction HideActionId="hdm.Mscrm.SubGrid.account.AddNewStandard.Hide" Location="Mscrm.SubGrid.account.AddNewStandard" />
            </CustomActions>
            <Templates>
              <RibbonTemplates Id="Mscrm.Templates" />
            </Templates>
              <CommandDefinition Id="hdm.account.NewContactReport.Command">
                <EnableRules />
                <DisplayRules>
                  <DisplayRule Id="hdm.account.CreateState.DisplayRule" />
                </DisplayRules>
                <Actions>
                  <JavaScriptFunction FunctionName="HDM.Account.NewContactReportOnClick" Library="HDM.Account" />
                </Actions>
              </CommandDefinition>
            </CommandDefinitions>
            <RuleDefinitions>
              <TabDisplayRules />
              <DisplayRules>
    
              </DisplayRules>
              <EnableRules>
               </EnableRules>
            </RuleDefinitions>
            <LocLabels>
              <LocLabel Id="hdm.account.ContactReport.Button.Alt">
                <Titles>
                  <Title description="Contact Report" languagecode="1033" />
                </Titles>
              </LocLabel>
              <LocLabel Id="hdm.account.ContactReport.Button.LabelText">
                <Titles>
                  <Title description="New Contact Report" languagecode="1033" />
                </Titles>
              </LocLabel>
              <LocLabel Id="hdm.account.ContactReport.Button.ToolTipDescription">
                <Titles>
                  <Title description="Create a new Contact Report" languagecode="1033" />
                </Titles>
              </LocLabel>
              <LocLabel Id="hdm.account.ContactReport.Button.ToolTipTitle">
                <Titles>
                  <Title description="Contact Report" languagecode="1033" />
                </Titles>
              </LocLabel>
             </LocLabels>
          </RibbonDiffXml>

    JavaScript:

        NewContactReportOnClick: function () {
            var parameters = {};
            parameters["hdm_accountid"] = Xrm.Page.data.entity.getId();
            parameters["hdm_accountidname"] = Xrm.Page.getAttribute("name").getValue();
            Xrm.Utility.openEntityForm("hdm_tripreport", null, parameters);
        },

    CFO error:

    CFO Fidler:

    When doing the same with the browser, the URL is different, also a http 404 error , but no error pop up:

    404 HTTPS crmstg... /HDMMSCRM/HDM.Account

    Any suggestions are appreciated.

    Regards,
    Per


    Per

    Thursday, April 24, 2014 9:17 PM