{"id":3887,"date":"2020-07-24T11:35:33","date_gmt":"2020-07-24T11:35:33","guid":{"rendered":"https:\/\/himbap.com\/blog\/?p=3887"},"modified":"2020-07-24T11:35:33","modified_gmt":"2020-07-24T11:35:33","slug":"copy-share-point-document-from-one-entity-to-another","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=3887","title":{"rendered":"Copy Share Point Document From One Entity to Another"},"content":{"rendered":"<p><strong>Introduction<\/strong><br \/>\nIn earlier article we discussed how we can create Document Location Record using Flow, now let&#8217;s say if after creating document location record we also wants to copy document from one entity to another, in our case we are creating contact from account and let&#8217;s say we want tot copy Share Point document from accounts to contact. In this article we are going to discuss how we can do this using Flow.<\/p>\n<p><strong>Details<\/strong><br \/>\nBefore going to details make sure you have gone through our earlier blog first<br \/>\n<strong><a href=\"https:\/\/himbap.com\/blog\/?p=3861\">Creating Document Location Record using Flow<\/a><\/strong><\/p>\n<p>After following first blog, you can create contact entity and document location folder for contact entity. Now to copy files from account entity to contact we can use following steps:<br \/>\nMake Sure you are completed flow up-to following steps:<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_THOsq4Kbtk.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3893 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_THOsq4Kbtk-300x240.png\" alt=\"chrome_THOsq4Kbtk\" width=\"300\" height=\"240\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_THOsq4Kbtk-300x240.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_THOsq4Kbtk.png 618w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n&gt; Next Click on + New Step to add new step<br \/>\n&gt; Search Share Point and select Get Files (property only) action<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/sh1.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3889 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/sh1-300x122.jpg\" alt=\"sh1\" width=\"300\" height=\"122\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/sh1-300x122.jpg 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/sh1-624x254.jpg 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/sh1.jpg 630w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nWe will use this steps to get properties details of the files.<br \/>\n&gt; We need to configure it like following<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_yrNuWDhRHy.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3890 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_yrNuWDhRHy-300x130.png\" alt=\"chrome_yrNuWDhRHy\" width=\"300\" height=\"130\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_yrNuWDhRHy-300x130.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_yrNuWDhRHy.png 619w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>As in above steps we want to retrieve all the files from account folder so we have used following query under Limit Entries to Folder<\/p>\n<p><strong>\/account\/Account Naame_toUpper(replace(triggerBody()?[&#8216;entity&#8217;]?[&#8216;accountid&#8217;],&#8217;-&#8216;,&#8221;))<\/strong><\/p>\n<p>&gt; Again click on + New Step and add Copy files action from Share Point. We need to configure following properties of this action.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_NRjlP2KJ0d.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3891 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_NRjlP2KJ0d-300x137.png\" alt=\"chrome_NRjlP2KJ0d\" width=\"300\" height=\"137\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_NRjlP2KJ0d-300x137.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2020\/07\/chrome_NRjlP2KJ0d.png 614w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nIn above steps we need to configure destination folder path like following:<\/p>\n<p><strong>\/contact\/FullName_ContactId <\/strong><\/p>\n<p>We are using variable where we have already formatted contact id in required format.<\/p>\n<p><strong>Summary<\/strong><br \/>\nWe can use above actions to copy files from one entity folder to another entity if required using flow. While setting up path make sure to set it like out of the box Share Point integration .<\/p>\n<p>Hope it will help someone!<br \/>\n<strong>Keep learning, Keep sharing !!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In earlier article we discussed how we can create Document Location Record using Flow, now let&#8217;s say if after creating document location record we also wants to copy document from one entity to another, in our case we are creating contact from account and let&#8217;s say we want tot copy Share Point document from accounts to contact. In this&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=3887\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":3231,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,402,522,593],"tags":[794,793,787,795],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3887"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3887"}],"version-history":[{"count":5,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3887\/revisions"}],"predecessor-version":[{"id":3896,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3887\/revisions\/3896"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/3231"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}