Show TOC

List<EpmRibbonAction> GetRibbonComponents(); Locate this document in the navigation structure

Modifies components (such as buttons and menus) in the EPM custom tab in the ribbon.

Example
 List <EpmRibbonAction> actionList = newList<EpmRibbonAction>();
actionList.Add(newEpmRibbonAction(Commands.DeleteReportButton, ActionType.Remove)); 
actionList.Add(newEpmRibbonAction(Commands.AnalysisGroup, ActionType.Remove));
Button recordButton = Group.CreateNewButton(RecordButton, true, true, "", false);
actionList.Add(newEpmRibbonAction(Commands.EditReportButton, ActionType.AddAfter, newList<object>() {recordButton }));
List <object> componentsToAdd = newList<object>();
Group customGroup = Tab.CreateNewGroup(ExtensibilityGroup);
customGroup.AddNewButton(PlusButton, true, true, string.Empty);
customGroup.AddNewButton(Commands.DeleteReportButton, true, true, string.Empty);
customGroup.AddNewButton(OpenButton, true, true, string.Empty);
componentsToAdd.Add(customGroup);
actionList.Add(newEpmRibbonAction(Commands.CollaborationGroup, ActionType.AddBefore,
componentsToAdd));
return actionList;
	public conststring PlusButton = "PlusButtonId";
 publicconststring StarButton = "StarButtonId";
	publicconststring	RecordButton = "RecordButtonId";
 publicconststring ExtensibilityGroup = "ExtensibilityGroupId";
Example explained

The method returns the following list of actions:

List <EpmRibbonAction> actionList = newList<EpmRibbonAction>(); 

This action deletes the Delete Reports button from the EPM tab.

actionList.Add(newEpmRibbonAction(Commands.DeleteReportButton, ActionType.Remove));

This action deletes the Data Analysis group from the EPM tab.

actionList.Add(newEpmRibbonAction(Commands.AnalysisGroup, ActionType.Remove));

These actions add the button of your choice to the EPM tab. This button is placed after the Edit Report button and is the same type of button.

 Button recordButton = Group.CreateNewButton(RecordButton, true, true, "", false);
actionList.Add(newEpmRibbonAction(Commands.EditReportButton, ActionType.AddAfter, newList<object>() {recordButton }));
These actions add to the EPM tab a group that contains three buttons, namely the Delete Reports button. The group is placed before the Collaboration group.
Note This is a good example of how you can move a button from one group to another group: you have already specified the removal of the Delete Reports button and then you specify adding it to another group.
 List <object> componentsToAdd = newList<object>();
Group customGroup = Tab.CreateNewGroup(ExtensibilityGroup);
customGroup.AddNewButton(PlusButton, true, true, string.Empty);
customGroup.AddNewButton(Commands.DeleteReportButton, true, true, string.Empty);
customGroup.AddNewButton(OpenButton, true, true, string.Empty);
componentsToAdd.Add(customGroup);
actionList.Add(newEpmRibbonAction(Commands.CollaborationGroup, ActionType.AddBefore, componentsToAdd));

Then, you return the list of actions.

return actionList;

The above actions are performed, keeping in mind the following:

 public conststring PlusButton = "PlusButtonId";
publicconststring StarButton = "StarButtonId";
publicconststring RecordButton = "RecordButtonId";
publicconststring ExtensibilityGroup = "ExtensibilityGroupId";