Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $newUserCustomActionItemFormInfoPath = $targetList.UserCustomActions.Add()
- $newUserCustomActionItemFormInfoPath.Rights = "EditListItems"
- $newUserCustomActionItemFormInfoPath.Location = "CommandUI.Ribbon"
- $newUserCustomActionItemFormInfoPath.CommandUIExtension = '<CommandUIExtension>
- <CommandUIDefinitions>
- <CommandUIDefinition Location="Ribbon.Tabs.InfoPathListDisplayTab.Manage.Controls._children">
- <Button Id="Ribbon.Tabs.InfoPathListDisplayTab.Manage.SendItemAsMail" Alt="Nachricht versenden" Sequence="503"
- Command="sendMessageAsMailInfoPathView"
- LabelText="Send mail"
- TemplateAlias="o1"
- Image32by32="/_layouts/15/images/discoveryExport_32x32.png"
- Image16by16="/_layouts/15/images/discoveryExport_16x16.png" />
- </CommandUIDefinition>
- </CommandUIDefinitions>
- <CommandUIHandlers>
- <CommandUIHandler Command="sendMessageAsMailInfoPathView"
- CommandAction="javascript: msg.sharepoint.common.msgManagement.createMail(''{ListId}'', {SelectedItemId});" />
- </CommandUIHandlers>
- </CommandUIExtension >'
- $newUserCustomActionItemFormInfoPath.Title = "Send mail"
- $newUserCustomActionItemFormInfoPath.Update()
Add Comment
Please, Sign In to add comment