New attachment type added, now I can't open old attachments

Previously we had our attachments stores locally on our file server. Recently, I implemented the sharepoint connection and that has worked without any issues so far, any new attachment added to a PO for example shows up in the sharepoint page. The issue I am running into is now all the old attachments, so anything that was originally stored in the file server, is no longer able to be accessed and we are shown this error when attempting to open any attachment pre-sharepoint:

Bad Request. {“error”:{“code”:“-2147024809, System.ArgumentException”,“message”:{“lang”:“en-US”,“value”:“serverRelativeUrl\r\nParameter name: Specified value is not supported for the serverRelativeUrl parameter.”}}}

I asked on Epiccare and they advised me to move migrate the files from the file server to the sharepoint site where they are being store. I moved one file as a test and was shown the same error. I also tried it disabling the old file server attachment type and got the same error. Just looking to see if anyone has ran into issues like this, if I’m missing anything.

@maramburu Welcome to the forum!

Your post title says ‘new attachment type’ but you describe an attachment METHOD. It is true that each attachment type can only have one active attachment method at a time. Eg. you cannot access your PO attached documents via a File Share AND SharePoint at the same time.

You would need to create a second PO Attachment Type whose attachment method is SharePoint, and then everything would be fine. Otherwise, as support indicated, you’ll need to migrate your file system attachments up to SharePoint and reconnect them to the transaction in Kinetic, as well as cleanup/remove the old attachment links.

This is why:

You would need to delete the ‘old’ attachment link, and create a new attachment link for the migrated file (connect the file you moved to SharePoint to the PO again)

Hope that helps!

1 Like

Sorry for the mixup, I referred to it as attachment type since I used “Attachment Type Maintenance” to add the Sharepoint connection.

This is basically reuploading each attachment to its respective transaction correct? Do you have any tips or anything I could read up on to help with this migration?

Hopefully someone else who has done this will chime in. I’ve not dealt with creating SharePoint attachments, only migrating from SharePoint.

I would actually use DMT (Data Migration Tool) that comes with Epicor, but honestly not sure if it’ll handle SharePoint attachments. If you can mass upload the files to SharePoint, AND create the ‘links’ to the files, AND map them to the PO #s, you can feed that data into DMT and it’ll do the work. And you can use DMT to delete all the old links. Since I’m not sure about creating Sharepoint links and mass uploads, this is about as far as I go.

1 Like

Did you change the default attachment type for the system? Or just create a new attachment type?

I ran into a situation where we used to drag and drop files and the DocTypeID was blank. And then when I changed the default attachment type / method for the company to a new one, all those that had a blank doctypeID were trying to open using the new default type/method. To fix it I created an attachment type/method for all the blank ones, and then DMTd that attachment type with its proper method (as @MikeGross said) and then I was able to open those old ones.

I am re-reading any yeah @MikeGross gave you a nice way forward.

@utah - If I make a DMT file with PO#, filename, and an attachment type of Sharepoint, will DMT/Epicor consume the file and send it up to Sharepoint?

(I’ve never tried it with Sharepoint or ECM using DMT)

Yes, after I added the new Sharepoint attachment method, I did change the company default from the local server to Sharepoint.

I appreciate all the help. I’ll talk with my manager about using DMT to handle this.

Currently, I told my coworkers who are affected by this issue, that if they need to refer back to an old non-Sharepoint attachment, to copy the path of the file and open it from the local server.

That I don’t know Mike, I doubt it. I think the xfileref/xfileattach are just data and the business object that runs when attaching or opening documents just references whatever’s in that table and does the appropriate action based on the setup of the file (i.e. the attachment type + attachment method).

Right, but you can do what Mike said and make another attachment type of filereference or whatever and then do a dMT to change all those old ones to that one so at least they open fine. Uploading all those into sharepoint at this time is something you COULD do, but it’s really up to you.