Guest User

Untitled

a guest
Nov 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. $newUserCustomActionItemFormInfoPath = $targetList.UserCustomActions.Add()
  2. $newUserCustomActionItemFormInfoPath.Rights = "EditListItems"
  3. $newUserCustomActionItemFormInfoPath.Location = "CommandUI.Ribbon"
  4. $newUserCustomActionItemFormInfoPath.CommandUIExtension = '<CommandUIExtension>
  5. <CommandUIDefinitions>
  6. <CommandUIDefinition Location="Ribbon.Tabs.InfoPathListDisplayTab.Manage.Controls._children">
  7. <Button Id="Ribbon.Tabs.InfoPathListDisplayTab.Manage.SendItemAsMail" Alt="Nachricht versenden" Sequence="503"
  8. Command="sendMessageAsMailInfoPathView"
  9. LabelText="Send mail"
  10. TemplateAlias="o1"
  11. Image32by32="/_layouts/15/images/discoveryExport_32x32.png"
  12. Image16by16="/_layouts/15/images/discoveryExport_16x16.png" />
  13. </CommandUIDefinition>
  14. </CommandUIDefinitions>
  15. <CommandUIHandlers>
  16. <CommandUIHandler Command="sendMessageAsMailInfoPathView"
  17. CommandAction="javascript: msg.sharepoint.common.msgManagement.createMail(''{ListId}'', {SelectedItemId});" />
  18. </CommandUIHandlers>
  19. </CommandUIExtension >'
  20.  
  21. $newUserCustomActionItemFormInfoPath.Title = "Send mail"
  22. $newUserCustomActionItemFormInfoPath.Update()
Add Comment
Please, Sign In to add comment