Attachment error

Hi,

when we attach a file(pdf/excel) in poheader, we are receiving below error message. we have sharepoint as storage location.

the filename is unique and does not have special character.

we are in 10.2.500.5

please provide your insight in handling this issue.

Note: the sharepoint server credentials are verified and ok.

Is this issue coming from All the Clients ? have you tried from Server - Client ?
Try storing the files to any other location.

Hi,
its coming from all clients and server.
our sharepoint configurations

ok, will check storing file to other location? but this will affect every modules right?

Definitely, since the Storage Folder Path is central …
This could be done at Off Timing…

ok, i will try changing in test environment and get back to you around lunch…its very annoying as the attachment is working at po line level or po release level or attachment in supplier entry screen.

Also Look into Server Event Viewer Log , sometimes the right issue appears there.
As I learned that you are getting Error only in PO Header while Rest of the Modules are working, in this case, this seems to be :
1- File Issue
2- Specific Folder Access Rights (Less Chance)
3- Epicor Form Level Customization (Try in Default Form)

definitely no customization, folder access right (domain admin have same issue), file issue? (tried attaching simple text file and a usual po form pdf ) - they all failing to attach.

the event server error log is below.

Server Side Error
Server Side Exception
EpicorServerException
Correlation ID: c6a58922-7fef-4ec7-bf38-2cb166e7f7cf
Description: Exception of type ‘Microsoft.SharePoint.SoapServer.SoapServerException’ was thrown.
Program: System.Web.Services.dll
Method: ReadResponse
Original Exception Type: SoapException
Server Trace Stack: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Ice.Lib.SPLists.Lists.GetListItems(String listName, String viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode queryOptions, String webID) in C:_Releases\ICE\RL10.2.500.0FW\Source\Shared\Lib\Ice.Lib.SharepointHelper\Web References\SPLists\Reference.cs:line 435
at Ice.Lib.Attachments.SharePointAttachmentHelper.GetDocumentId(Lists spLists, String FileName, Boolean ShowErrors, Boolean deleted, String& ListID, String& ViewID, String& fileRef) in C:_Releases\ICE\RL10.2.500.0FW\Source\Shared\Lib\Ice.Lib.SharepointHelper\SharePointHelper.cs:line 561
at Ice.Lib.Attachments.SharePointAttachmentHelper.AttachmentExists(String fileName, Boolean deleted) in C:_Releases\ICE\RL10.2.500.0FW\Source\Shared\Lib\Ice.Lib.SharepointHelper\SharePointHelper.cs:line 799
at Ice.Services.BO.AttachmentSvcFacade.SpFileExists(String docTypeID, String parentTable, String fileName) in C:_Releases\ICE\RL10.2.500.0FW\Source\Server\Services\BO\Attachment\AttachmentSvcFacade.cs:line 666
at SyncInvokeSpFileExists(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func2 func) in C:\_Releases\ICE\RL10.2.500.0FW\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59 at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func2 func) in C:_Releases\ICE\RL10.2.500.0FW\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28

Do you have Meta Data defined for POHeader? If so, does SharePoint have the same columns that Epicor thinks has?

Hi Mark,
we dont use metadata. the client config SpLogOnMode is interactive. i feel clueless.

It is very odd that POHeader is the only table giving you trouble as it’s all one document library. :thinking:

If you go to the POHeader folder in the document library, do you see anything strange there? How many items in that folder?

POHeader folder contains over 1000 attachments and the last attachment was made on 2nd dec 2020, , i can browse and view the files as well in the browser. nothing strange from sharepoint aspect as well.

no customizations/bpm around poheader or attachments. :frowning_face:

Hi Prakash,

A couple of additional thoughts, are you always trying to attach to same PO? Did you do any recent upgrade/change to system since 12.2.2020? Is there any chance that something changed and made the “approved” status on PO come into account when attachment is made?

Nancy

tried with different po and different supplier, no luck. havent done any change to systems for the last 12 months.

Have you tried an unapproved vs approved PO?

hi nancy, i tried on un-approved po/approved po/pending po, all fails! :worried:

1 Like

Probably it is Sharepoint user rights? Did you try to use Sharepoint admin?

hi @Olga , if its sharepoint rights, it will fail in other companies and will not attach po line level or po rel level right?

i did manually accessed sharepoint site and uploaded file as myself also using the credentials configured in company maintenance, works fine. this rules out sharepoint credential/connection issue right?

You are right…
Can you use another company pointed to another SP site and check if POHeader attachements work \for other folderl? Probably something wrong with those 2K files…

hi @Olga
the attachment is working in another company (bfrl) and even run a sql query on xfileref counted number of records in poheader grouped by company. i picked a company having highest number of attachments, and attached a file, it worked (below image jptest*.txt uploaded via epicor).

but not working on company 304 poheader level attachment…:worried: :worried:

1 Like

I don’t know how you are familar with SP stuff, but probably, if you try to create CAML query to sharepoint online folder manually, you can narrow down the problem.

Example: SharePoint Online: How to Use CAML Query in PowerShell? - SharePoint Diary

Query that is used by GetDocumentId is
`XmlDocument xmlDoc = new System.Xml.XmlDocument();
XmlElement elQuery = xmlDoc.CreateElement(“Query”);
XmlElement elFields = xmlDoc.CreateElement(“ViewFields”);
XmlElement elOptions = xmlDoc.CreateElement(“QueryOptions”);

elQuery.InnerXml = "<Where><Contains><FieldRef Name=\"FileRef\" /><Value Type=\"Text\">/<![CDATA[" + FileName + "]]></Value></Contains></Where>";
elFields.InnerXml = "<FieldRef Name='ID' /><FieldRef Name='Title' /><FieldRef Name='FileRef' /><FieldRef Name='BaseName' />";
elOptions.InnerXml = "<Folder>" + companyID + "/" + tableName + "/</Folder>";
XmlNode ndListItems = spLists.GetListItems(ListID, null, elQuery, elFields, null, elOptions, null);