Hi Friends,
We recently upgraded CRM 2011 to CRM 2016,we have Approve custom button in Home and subgrid level its not working in CRM 2016 on premise.
Ribbon Diff xml file:
<RibbonDiffXml> <CustomActions> <CustomAction Id="phm.HomepageGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.CustomAction" Location="Mscrm.HomepageGrid.ics_timecardline.MainTab.Collaborate.Controls._children" Sequence="51"> <CommandUIDefinition> <Button Command="HomepageGrid.ics_timecardline.Approve.Command" Id="HomepageGrid.ics_timecardline.MainTab.Collaborate.Approve.Button" Image32by32="$webresource:ics_TimeEntryApprove32" Image16by16="$webresource:ics_TimeEntryApprove16" LabelText="$LocLabels:HomepageGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.LabelText" Sequence="51" TemplateAlias="o1" ToolTipTitle="$LocLabels:HomepageGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.ToolTipTitle" ToolTipDescription="$LocLabels:HomepageGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.ToolTipDescription" /> </CommandUIDefinition> </CustomAction> <CustomAction Id="phm.HomepageGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.CustomAction" Location="Mscrm.HomepageGrid.ics_timecardline.MainTab.Collaborate.Controls._children" Sequence="53"> <CommandUIDefinition> <Button Command="HomepageGrid.ics_timecardline.Reject.Command" Id="HomepageGrid.ics_timecardline.MainTab.Collaborate.Reject.Button" Image32by32="$webresource:ics_TimeEntryDisapprove32" Image16by16="$webresource:ics_TimeEntryDisapprove16" LabelText="$LocLabels:HomepageGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.LabelText" Sequence="53" TemplateAlias="o1" ToolTipTitle="$LocLabels:HomepageGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.ToolTipTitle" ToolTipDescription="$LocLabels:HomepageGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.ToolTipDescription" /> </CommandUIDefinition> </CustomAction> <CustomAction Id="phm.SubGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.CustomAction" Location="Mscrm.SubGrid.ics_timecardline.MainTab.Collaborate.Controls._children" Sequence="53"> <CommandUIDefinition> <Button Command="HomepageGrid.ics_timecardline.Approve.Command" Id="SubGrid.ics_timecardline.MainTab.Collaborate.Approve.Button" Image32by32="$webresource:ics_TimeEntryApprove32" Image16by16="$webresource:ics_TimeEntryApprove16" LabelText="$LocLabels:SubGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.LabelText" Sequence="53" TemplateAlias="o3" ToolTipTitle="$LocLabels:SubGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.ToolTipTitle" ToolTipDescription="$LocLabels:SubGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.ToolTipDescription" /> </CommandUIDefinition> </CustomAction> <CustomAction Id="phm.SubGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.CustomAction" Location="Mscrm.SubGrid.ics_timecardline.MainTab.Collaborate.Controls._children" Sequence="56"> <CommandUIDefinition> <Button Command="HomepageGrid.ics_timecardline.Reject.Command" Id="SubGrid.ics_timecardline.MainTab.Collaborate.Reject.Button" Image32by32="$webresource:ics_TimeEntryDisapprove32" Image16by16="$webresource:ics_TimeEntryDisapprove16" LabelText="$LocLabels:SubGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.LabelText" Sequence="56" TemplateAlias="o3" ToolTipTitle="$LocLabels:SubGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.ToolTipTitle" ToolTipDescription="$LocLabels:SubGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.ToolTipDescription" /> </CommandUIDefinition> </CustomAction> </CustomActions> <Templates> <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates> </Templates> <CommandDefinitions> <CommandDefinition Id="HomepageGrid.ics_timecardline.Approve.Command"> <EnableRules> <EnableRule Id="AtLeastOneSelected.EnableRule" /> </EnableRules> <DisplayRules /> <Actions> <JavaScriptFunction FunctionName="TimeEntry.Approve" Library="$webresource:ics_TimeEntryJS.js"> <CrmParameter Value="SelectedControlSelectedItemIds" /> <CrmParameter Value="SelectedControl" /> </JavaScriptFunction> </Actions> </CommandDefinition> <CommandDefinition Id="HomepageGrid.ics_timecardline.Reject.Command"> <EnableRules> <EnableRule Id="AtLeastOneSelected.EnableRule" /> </EnableRules> <DisplayRules /> <Actions> <JavaScriptFunction FunctionName="TimeEntry.Reject" Library="$webresource:ics_TimeEntryJS.js"> <CrmParameter Value="SelectedControlSelectedItemIds" /> <CrmParameter Value="SelectedControl" /> </JavaScriptFunction> </Actions> </CommandDefinition> </CommandDefinitions> <RuleDefinitions> <TabDisplayRules /> <DisplayRules /> <EnableRules> <EnableRule Id="AtLeastOneSelected.EnableRule"> <SelectionCountRule AppliesTo="SelectedEntity" Minimum="1" /> </EnableRule> </EnableRules> </RuleDefinitions> <LocLabels> <LocLabel Id="HomepageGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.LabelText"> <Titles> <Title description="Approve" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="HomepageGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.ToolTipDescription"> <Titles> <Title description="Approve the selected Timecard Lines" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="HomepageGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.ToolTipTitle"> <Titles> <Title description="Approve" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="HomepageGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.LabelText"> <Titles> <Title description="Reject" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="HomepageGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.ToolTipDescription"> <Titles> <Title description="Reject the selected Timecard Lines" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="HomepageGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.ToolTipTitle"> <Titles> <Title description="Reject" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="SubGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.LabelText"> <Titles> <Title description="Approve" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="SubGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.ToolTipDescription"> <Titles> <Title description="Approve the selected Timecard Lines" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="SubGrid.ics_timecardline.MainTab.Collaborate.Approve.Button.ToolTipTitle"> <Titles> <Title description="Approve" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="SubGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.LabelText"> <Titles> <Title description="Reject" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="SubGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.ToolTipDescription"> <Titles> <Title description="Reject the selected Timecard Lines" languagecode="1033" /> </Titles> </LocLabel> <LocLabel Id="SubGrid.ics_timecardline.MainTab.Collaborate.Reject.Button.ToolTipTitle"> <Titles> <Title description="Reject" languagecode="1033" /> </Titles> </LocLabel> </LocLabels> </RibbonDiffXml> Javascript: TimeEntry.Approve = function (ids, homepageGrid, onSuccess) { TimeEntry.ChangeState = function (id, logicalName, state, status, onSuccess, homepageGrid) { the above code working in 2011 when its upgraded to 2016 its not working. thanks for help.
|
Show details |
*This post is locked for comments