I am using Office 365 Move File/Folder activity to move file to destination folder.
File To be moved - it is of datatype UiPath.Graph.DriveItem
Destination Folder - It is of datatype UiPath.Graph.Grive Item
Activity is successfully moving the file but throwing below exception
Move File/Folder: A value of type ‘UiPath.MicrosoftOffice365.Files.Models.O365WorkbookRemoteItem’ cannot be set to the location with name ‘MovedDriveItem’ because it is a location of type ‘Microsoft.Graph.DriveItem’.
If your objective is solely to move the file from source to destination, you can surround the activity in the Try-Catch & handle the exception thrown locally. Since it it already successfully moving the file but throwing an exception, you can handle the exception & proceed with any further actions.
If your objective is to identify the root cause of the issue & handle it accordingly, you can try the following steps:
→ Assuming you have a variable named sourceFile of type UiPath.MicrosoftOffice365.Files.Models.O365WorkbookRemoteItem representing the file you want to move.
Create a new variable, let’s name it sourceDriveItem, of type UiPath.Graph.DriveItem.
Assign the value of sourceFile to sourceDriveItem variable. This will perform the data type conversion.
I have a similar issue that modern and classic o365 activities are not compatible with each other… how to convert UiPath.MicrosoftOffice365.Files.Models.O365WorkbookRemoteItem into UiPath.Graph.DriveItem? Simple Assign doesn’t work here.