{"id":294,"date":"2024-01-20T23:01:30","date_gmt":"2024-01-20T23:01:30","guid":{"rendered":"https:\/\/kb.ctse.nl\/?page_id=294"},"modified":"2024-05-05T11:20:13","modified_gmt":"2024-05-05T11:20:13","slug":"powerdoc-flow-template-custom-button","status":"publish","type":"page","link":"https:\/\/kb.ctse.nl\/?page_id=294","title":{"rendered":"Flow Template: Custom button"},"content":{"rendered":"\n<p>To add a PowerDoc Mail merge button on a view or form:<\/p>\n\n\n\n<p>Go to make.powerapps.com<br>From the Apps secton, edit App<br>From entity in commandbar choose &#8220;Edit command bar&#8221;<\/p>\n\n\n\n<p><strong>Button on (sub)grid:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Choose &#8220;Main view&#8221; or &#8220;Sub view&#8221;<\/li>\n\n\n\n<li>Add new button<\/li>\n\n\n\n<li>as icon choose webresource &#8220;ctse_\/mailmerge\/mailmerge.svg&#8221;<\/li>\n\n\n\n<li>as action choose &#8220;Javascript&#8221; and add webresource &#8220;ctse_\/mailmerge\/ribbon.js&#8221;<\/li>\n\n\n\n<li>as function name type &#8220;Ctse.MailmergeRibbon.OpenDialog&#8221; and add parameter &#8220;SelectedControl&#8221;<\/li>\n\n\n\n<li>as visibility choose conditional and use this formula: If(CountRows(Self.Selected.AllItems) &gt; 0; true;false)<br>Save and publish<\/li>\n<\/ul>\n\n\n\n<p>Note: If using it on a &#8220;Sub view&#8221;, repeat above steps also choosing &#8220;Associated view&#8221;.<\/p>\n\n\n\n<p><strong>Button on form:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Choose &#8220;Main form&#8221;<\/li>\n\n\n\n<li>Add new button<\/li>\n\n\n\n<li>as icon choose webresource &#8220;ctse_\/mailmerge\/mailmerge.svg&#8221;<\/li>\n\n\n\n<li>as action choose &#8220;Javascript&#8221; and add webresource &#8220;ctse_\/mailmerge\/ribbon.js&#8221;<\/li>\n\n\n\n<li>as function name type &#8220;Ctse.MailmergeRibbon.OpenDialog&#8221; and add parameter &#8220;SelectedControl&#8221;<\/li>\n\n\n\n<li>as visibility choose conditional and use this formula: If(IsBlank(Self.Selected.Item.{entity}); false; true)<br>Save and publish<\/li>\n<\/ul>\n\n\n\n<p>Note: when clicking the button, only templates of type Flow Mail merge from View\/Form will be available.<\/p>\n\n\n\n<p><strong>Extra params in button command:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>add string-parameter with value (NB: all keys and values are optional, use url-encoded values!), for example:<br>dialogTitle=Mail%20Merge&amp;hide=splitsize,createactivity,customtemplate,skipfirstlabels<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>To add a PowerDoc Mail merge button on a view or form: Go to make.powerapps.comFrom the Apps secton, edit AppFrom entity in commandbar choose &#8220;Edit command bar&#8221; Button on (sub)grid: Note: If using it on a &#8220;Sub view&#8221;, repeat above steps also choosing &#8220;Associated view&#8221;. Button on form: Note: when clicking the button, only templates [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":274,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-294","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/kb.ctse.nl\/index.php?rest_route=\/wp\/v2\/pages\/294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.ctse.nl\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kb.ctse.nl\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kb.ctse.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.ctse.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=294"}],"version-history":[{"count":5,"href":"https:\/\/kb.ctse.nl\/index.php?rest_route=\/wp\/v2\/pages\/294\/revisions"}],"predecessor-version":[{"id":425,"href":"https:\/\/kb.ctse.nl\/index.php?rest_route=\/wp\/v2\/pages\/294\/revisions\/425"}],"up":[{"embeddable":true,"href":"https:\/\/kb.ctse.nl\/index.php?rest_route=\/wp\/v2\/pages\/274"}],"wp:attachment":[{"href":"https:\/\/kb.ctse.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}