Freitag, 17. Februar 2012

Bugfix for 'Walkthrough: Replacing a Button on the Server Ribbon'

There is an example how to replace a button on the server ribbon available in the MSDN with one issue: it doesn't work ... ;-)

But I found the error and commented it below in the Community Content-section. For completeness I'll post it in my blog again:

There exists no button with the ID 'Ribbon.Library.Actions.ConnectToClient.ReplacementButton' so a javascript-error is thrown in the browser. The part of the xml must changed to this line and then it works:

<CommandUIDefinition Location="Ribbon.Library.Actions.ConnectToClient">
  <Button Id="Ribbon.Library.Actions.ConnectToClient" Command="ReplacementButtonCommand" ...>


Just remove the string '.ReplacementButton' in the Id of the Button from the example and it works.

Keine Kommentare: