2013-04-17 164 views
0

我創建了一個自定義操作並將其添加到某個功能,但在激活該功能時未顯示它的位置,不知道發生了什麼問題。下面的代碼:Sharepoint 2010自定義操作未出現

<?xml version="1.0" encoding="utf-8"?> 
<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> 
    <CustomAction 
    Id="0b5d3f99-ea17-4a93-ba04-9744a8c099af" 
    RegistrationType="List" 
    Title="Developer User Action" 
    RegistrationId="0x0100f5be96b7d764406681760305e87f90ac" 
    Sequence="4" 
    Location="CommandUI.Ribbon.Display"> 
    <CommandUIExtension> 
    <CommandUIDefinitions> 
    <CommandUIDefinition Location="Ribbon.ListForm.Display.Actions.Controls._children"> 
     <Button 
     Id="Ribbon.ListForm.Display.Actions.DeveloperButton" 
     Command="OpenWebPart" 
     Image32by32="/_layouts/images/Actinium/Icons-Large/note_edit.png" 
     Image16by16="/_layouts/images/Actinium/Icons-Small/note_edit.png" 
     Sequence="4" 
     LabelText="User/Developer Request" 
     Description="Back and forth between developer/user to give results of request." 
     TemplateAlias="o1" /> 
    </CommandUIDefinition> 
    </CommandUIDefinitions> 
    <CommandUIHandlers> 
    <CommandUIHandler Command="OpenWebPart" CommandAction="javascript:window.open('http://www.google.ca')"></CommandUIHandler> 
    </CommandUIHandlers> 
</CommandUIExtension> 
</CustomAction> 
</Elements> 

回答

0

我設法得到這個工作,我做的代碼的一些變化,見下圖:

<?xml version="1.0" encoding="utf-8"?> 
<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> 
<CustomAction 
Id="0b5d3f99-ea17-4a93-ba04-9744a8c099af" 
RegistrationType="List" 
Title="Developer User Action" 
RegistrationId="10015" 
Sequence="4" 
Location="CommandUI.Ribbon.DisplayForm"> 
<CommandUIExtension> 
    <CommandUIDefinitions> 
    <CommandUIDefinition Location="Ribbon.ListForm.Display.Actions.Controls._children"> 
     <Button 
     Id="Ribbon.ListForm.Display.Actions.DeveloperButton" 
     Command="OpenWebPart" 
     Image32by32="/_layouts/images/Masco/Icons-Large/note_edit.png" 
     Image16by16="/_layouts/images/Masco/Icons-Small/note_edit.png" 
     Sequence="4" 
     LabelText="User/Developer Request" 
     Description="Back and forth between developer/user to give results of request." 
     TemplateAlias="o1" /> 
    </CommandUIDefinition> 
    </CommandUIDefinitions> 
    <CommandUIHandlers> 
    <CommandUIHandler Command="OpenWebPart" CommandAction="javascript:window.open('http://www.google.ca')"></CommandUIHandler> 
    </CommandUIHandlers> 
</CommandUIExtension> 
</CustomAction> 
</Elements> 
相關問題