[Bug]: External Storage - Document Attachments fails on Purch. Cr. Memo Hdr. due to trailing dot in generated SharePoint folder name
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in codeunit 8751 "DA External Storage Impl.", specifically GetTableNameFolder, and reproduce the Posted Purchase Credit Memo attachment upload through the SharePoint connector. The work is done when generated folder names remove unsupported trailing characters, including the trailing dot in "Purch. Cr. Memo Hdr.", before folders are created.
Written by the indexing model from the issue text.
Description
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
- 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;
- Dominant language
- AL
- Stars
- 683
- Forks
- 459
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 510
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/BCApps
-
Approved ext-ready-to-implement request-for-external Team: Finance
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/BCApps#12069 · 1 comment ·
Maintainers usually reply within 1 day
-
Team: SCM
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
microsoft/BCApps#12063 · 1 comment ·
Maintainers usually reply within 1 day
-
Approved request-for-external Team: SCM
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/BCApps#12033 · 1 comment ·
Maintainers usually reply within 1 day
-
Approved request-for-external Team: SCM
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/BCApps#12032 · 1 comment ·
Maintainers usually reply within 1 day
-
Approved Ownership: Needs Review Team: Other
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
microsoft/BCApps#11800 · 1 comment ·
Maintainers usually reply within 1 day
All issues in microsoft/BCApps
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
collective/icalendar#1854 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
rancher/rancher-ai-agent#412 ·
Maintainers usually reply within 6 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
apache/arrow-java#1311 ·
Maintainers usually reply within 2 days
-
Mend: dependency security vulnerability
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
opentok/Opentok-Python-SDK#272 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NVIDIA/earth2studio#1203 ·
Maintainers usually reply within 2 days