How to move attachments in field from one entity to another

To Move the attachments that are available in the field from one entity to another using Power Automate.

This Scenario is mainly used in Approval stages when file/image has to be moved from one entity to another.


High level resolution steps

  • With the help of Power Automate, the attachments can be moved from one entity to another.
  • File Uploaded in one entity(form) will be available in another entity when the records are sent for approval, without any changes.

Detailed resolution steps

Step 1 

  • Select a Dataverse actions as shown below in the picture, select the table in 1st action where the modification occurs.
  • Which means on click of a button in form level the Invoice status changes its choice based on condition given in 2nd Action. Once the status matches the Value, it accepts the condition and continues further.

Step 2 –

  •  Once the condition is met, the record from entity “sample table” moves into another entity named “Move into” as shown in the below picture.
  •  You can map the default fields from the trigger output options so that the fields data present in the “sample table” will be replicated into “move into” entity.

Step 3 –

  • Next add the Dataverse actions as shown below. Here, the attachment gets downloaded from the “sample table” entity and uploads the same file into “move into” entity along with the records.
  • Row ID in “Download a file or an image” should be mapped with a GUID from the trigger outputs action (1st Action) that should be selected from the dynamic content.
  • Row ID in “Upload a file or an image” should be mapped with trigger outputs action of “Add a new row” (From Step 2) which should be a GUID from the dynamic content once again.
  • You can refer the below image for your convenience.

Output

In the Initial stage the record will be in “not Submitted” state and then you upload your attachment in the “Invoice file” field and then hit the submit button for the record to go the Approver for Approving this record.


Next, Once the record is moved from “Sample Table” to “Move Into” Entity, the status gets changed to “Submitted to Approver” and the file is also moved into the “Invoice File” Field.

/* H1 style */ h1 { font-size: 24px; /* Adjust the size as needed */ font-weight: normal; /* You can use 'bold', 'lighter', 'bolder', or a number */ } /* H2 style */ h2 { font-size: 20px; /* Adjust the size as needed */ font-weight: normal; /* Adjust the weight as needed */ } /* H3 style */ h3 { font-size: 18px; /* Adjust the size as needed */ font-weight: normal; /* Adjust the weight as needed */ }