在 Ribbon.DocLibListForm 部分添加自定义操作时出现问题

发布于 2024-10-14 22:04:25 字数 1104 浏览 2 评论 0原文

美好的一天,

我正在尝试为“编辑属性”表单功能区添加自定义操作按钮,但该按钮仍未显示。该解决方案将部署在场级别和自定义列表(本示例中的 id 为 10001)

<CustomAction Id="DocumentExchange"
            Location="CommandUI.Ribbon.EditForm"
            Title="element title"
            RegistrationType="List"
            RegistrationId="10001">
<CommandUIExtension>
  <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.DocLibListForm.Edit.Actions.Controls._children">
      <Button
        Id="ExchangeDocumentButton"
        Sequence="1"   
        Command="ExchangeDocument"
        LabelText="label text"
        Image32by32="/_layouts/images/myIcon.png"
        TemplateAlias="o2"
        />          
    </CommandUIDefinition>
  </CommandUIDefinitions>
  <CommandUIHandlers>
    <CommandUIHandler
      Command="ExchangeDocument"
      CommandAction="javascript:alert('Not implemmented functionality call');"
      />
  </CommandUIHandlers>
</CommandUIExtension>        

我想知道问题是否一定是沙箱级别的部署解决方案,或者站点中是否缺少某些其他解决方案配置。

预先非常感谢您的帮助。

Good day,

I am trying to add a custom action button for the "edit properties" form ribbon, but the button is still not being displayed. The solution is going to be deployed in a farm level and for a custom list (with id 10001 for this example)

<CustomAction Id="DocumentExchange"
            Location="CommandUI.Ribbon.EditForm"
            Title="element title"
            RegistrationType="List"
            RegistrationId="10001">
<CommandUIExtension>
  <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.DocLibListForm.Edit.Actions.Controls._children">
      <Button
        Id="ExchangeDocumentButton"
        Sequence="1"   
        Command="ExchangeDocument"
        LabelText="label text"
        Image32by32="/_layouts/images/myIcon.png"
        TemplateAlias="o2"
        />          
    </CommandUIDefinition>
  </CommandUIDefinitions>
  <CommandUIHandlers>
    <CommandUIHandler
      Command="ExchangeDocument"
      CommandAction="javascript:alert('Not implemmented functionality call');"
      />
  </CommandUIHandlers>
</CommandUIExtension>        

I wonder if the problem has to be that is not a sandbox level deployment solution or if some additional solution configuration is missing in the site.

Thank you very much in advance for your help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

痴意少年 2024-10-21 22:04:25

我重新创建了您的示例,该按钮显示在注册 ID 为 10001 的自定义文档库的编辑表单上。所以看起来没有任何问题。

自定义文档库和自定义操作位于我的测试环境中的一个项目和一项功能中,并且我将该功能的范围限定为站点。
你是如何组织这个活动的?

一件事:您在 xml 中缺少 CustomAction 的结束标记。您的解决方案中是否存在此内容?

您的解决方案中是否存在可能导致异常或其他问题的其他代码?

问候, 安妮塔

I recreated your example and the button shows up on the edit form on a custom document library with a RegistrationId of 10001. So nothing seems wrong.

The custom document library and the custom action are in one project and in one feature in my test environment and I scoped the feature to Site.
How did you organize this?

One thing: you are missing the closing tag of CustomAction in the xml. Is this present in your solution?

Is there maybe other code present in your solution which can cause an exception or something?

Regards, Anita

人间不值得 2024-10-21 22:04:25

文档库的 RegistrationId 为 101,您可以尝试一下吗?

希望这有帮助,安妮塔

Document libraries have RegistrationId of 101, can you try this?

Hope this helps, Anita

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文