SharePoint Integration file attachments

Just wondering if anyone out there is using SharePoint integration for File Attachments?

If so what were your challenges? Is there anything we should be wary of?

We are using a mix of DocStar and SharePoint and they work very similarly. As you know, we are SaaS Public Cloud users and O365 as well.

Maybe the only gotcha is authentication. In your sysconfig file, you’ll want/need to change this line:

    <!--SpLogonMode allows specifying user credentials for SharePoint attachments. Default will use current Windows account, and Interactive will show dialog window to enter name and password. -->
    <SpLogonMode value="Interactive" options="Default|Interactive" />

Users will be prompted for their O365 or On-Prem windows password. They can choose to save it but when it comes time to change it, you have to go into Settings | Preferences and clear the account cache:

image

Otherwise, we ran into no real surprises. The Document Library looks the same as the File System or DocStar. Adding Meta-Data adds columns to your SP Content Type for that Document Library.

Mark W.

4 Likes

I thought changing passwords would be an issue when I looked the implementation guide. But I do like being able to see who actually added the attachment. It would be great to have the Clear SharePoint account cache to be enabled when your AD password changed. Not really sure how that would work.

One question I did have is what permissions did you have on your document library for your users? I’m just testing at the moment with an account that is the owner/admin of the site so I want to be 100% sure that if we were going to go down the “Identify who added the attachment” route that we have site permissions set correctly.

Oh I also meant to ask. I can’t see anywhere to restrict file size. I thought I saw something like that in E9, but I might be getting confused with Epicor ITSM.

Two points I just came across in testing.

Don’t name your Document Metadata Column Name the same as any existing SharePoint column names. If you do they won’t show up when you go to select columns in the SharePoint site, the file will be saved though.

There is also a character limit to the filename, which appears to be 30 characters including the extension. Here is the error.
image

Edit:
I believe it’t not the file itself, but the whole URL

Here is some links to some research.
https://blog.wbaer.net/2017/05/09/new-maxpath-limits-in-sharepoint-and-onedrive/
https://tahoeninjas.blog/2019/02/25/sharepoint-migration-mind-the-url-length/

Using the Datestamp option in your sysconfig may tip you over the limit. So beware… I particular if you are dragging and dropping an email in. The subject becomes the filename.

Edit 2:
But I might be wrong. I just looked at the URL for an attachment in error and it was only 139 characters long!

Edit 3
Further investigation by directly copying the file with the altered filename into the SharePoint library works, so…logging a call on this now. Just in case anyone was interested.

Edit 4
Problem PRB0210633 has been identified.

1 Like

After configuring this in my Dev VM. I forgot to do it on my local client…Just spent ages mucking about trying to get the Document Type working for client security…Indecently if you forget to enable it in the sysconfig and try to change form Sytem to client you get an error message, but the ice.DocType.FileTransferMode value still changes!

Using SharePoint mode and using Document Metadata you get the ability to search through SharePoint and it only returns results for files you have access for…Nice

1 Like

The next step in O365 integration is having Microsoft Search scan your database to get an Enterprise Search that includes your Epicor Data along with documents, emails, and Teams discussions. :wink:

1 Like

Or get the Extended Enterprise search license removed!..Don’t know why licensing for ES wasn’t left alone from E9…Grumble.Grumble.

1 Like

Ok there is a Problem for this. PRB0210633

Feel free to mention this in your support calls when attempting to use SharePoint for attachmnts and you have a stupidly long Sharepoint site URL

Currently testing moving from attachments on our share drive to Sharepoint.
Seems to work, but one major difference is when I open an attachment located on our share drive from an Epicor screen, I can edit it, save it and the changes are kept on the share drive.
With the Sharepoint method it seems to always open local copy on my PC and changes would then have to be re-uploaded.

Is there a way for the user to just edit and save changes back to the Sharepoint location?

The current SharePoint document implementation can be limiting. The design puts all attachments into a single library with a single schema. This removes some of the power of SharePoint with security/document types/libraries. Also, you can’t use your Azure AD at this point and still need a username/password to log into SharePoint.

If I were to do it again, I would use SharePoint to its fullest with my own document types, retention policies, security, etc. and I would add some event logic in SharePoint for when a document item (not the document itself) is added, updated, or deleted. I would perform a REST call to attach the document in Epicor to all applicable records by using the Link Document Type. Then I would be able to use AzAD, use multiple Document Libraries (e.g. Teams), and still be able to view within Epicor.

2 Likes

Nice idea.
What is event logic in SP? Do you have examples?

You wold have to solve the problem of auth in Epicor from SP. Probably it could be done with reusing AAD token… Also you would need to know to which item in Epicor you want to attach this link

In the past, I was going into the properties of the Document List and trying to add events there. Never got it to work. But now I think I would go this route:

I was thinking about having an Azure Function to receive the WebHook payload where there would be a config file which would indicate which Epicor records to link to by document type or the field contents. The Function would use a SharePoint service account and an API-KEY to do the attachment in Epicor. I hadn’t thought about logging the user who made the attachment. :thinking:

The other part that I haven’t thought out is how to validate Epicor Document IDs in SharePoint. I would need to know instance, company and site - might make that a part of the subscription. A search would be better yet. So there’s a bit more to it to consider…

1 Like

I am trying to set up SharePoint Integration in Company Maintenance. We have set up a new document site in SharePoint online and have a SharePoint Online user with admin rights to that site. When I do a test connection with Document Transfer Mode: File Transfer Using Service I get the error:
“For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.”

Where and how is this done?