Describe the issue
We are testing the integration between:
- External Storage - Document Attachments
- External File Storage - SharePoint Connector
When attempting to upload a document attachment from a Posted Purchase Credit Memo, the upload fails with the following error:
Expected behavior
Before creating folders in SharePoint, the connector should sanitize folder names and remove invalid trailing characters "." (and other character not supported by sharepoint).
For Example "Purch. Cr. Memo Hdr." should became "Purch._Cr._Memo_Hdr"
Steps to reproduce
- Configure External File Storage - SharePoint Connector
- Configure a valid SharePoint site
- Enable external storage for Document Attachments
- Open "Posted Purchase Credit Memos" and upload an attachment
Additional context
Business Central 28.5 SaaS
External Storage - Document Attachments
External File Storage - SharePoint Connector
No legacy API
I will provide a fix for a bug
Suggested fix
codeunit 8751 "DA External Storage Impl." implements "File Scenario"
Current code:
local procedure GetTableNameFolder(TableID: Integer): Text[100]
var
TableName: Text;
begin
// Try to get table name from metadata, fallback to table ID if not available
if not TryGetTableName(TableID, TableName) then
TableName := 'Table_' + Format(TableID);
// Replace invalid characters for folder names
TableName := DelChr(TableName, '=', '<>:"/\|?*');
TableName := ConvertStr(TableName, ' ', '_');
exit(CopyStr(TableName, 1, 100));
end;
New code:
procedure GetTableNameFolder(TableID: Integer): Text[100]
var
TableName: Text;
begin
// Try to get table name from metadata, fallback to table ID if not available
if not TryGetTableName(TableID, TableName) then
TableName := 'Table_' + Format(TableID);
// Replace invalid characters for folder names
TableName := DelChr(TableName, '=', '<>:"/\|?*');
TableName := ConvertStr(TableName, ' ', '_');
**TableName := DelChr(TableName, '>', '. ');**
exit(CopyStr(TableName, 1, 100));
end;
Describe the issue
We are testing the integration between:
When attempting to upload a document attachment from a Posted Purchase Credit Memo, the upload fails with the following error:
Expected behavior
Before creating folders in SharePoint, the connector should sanitize folder names and remove invalid trailing characters "." (and other character not supported by sharepoint).
For Example "Purch. Cr. Memo Hdr." should became "Purch._Cr._Memo_Hdr"
Steps to reproduce
Additional context
Business Central 28.5 SaaS
External Storage - Document Attachments
External File Storage - SharePoint Connector
No legacy API
I will provide a fix for a bug
Suggested fix
codeunit 8751 "DA External Storage Impl." implements "File Scenario"
Current code:
New code: