Hello,
Thank you for your question.
In the latest release of Business Central SaaS, attaching an incoming document to a General Journal Line via API is not supported through a standard endpoint out of the box. However, there are a few approaches you can consider:
Expose the Relevant Page via OData
To enable attachment functionality via API, you will likely need to expose a custom page or codeunit through OData web services. The standard General Journal Line page does not include attachment capabilities by default.
Use the Incoming Document Attachments Table
You can interact with the Incoming Document Attachments table (Table 133
) and link it to the journal line using the appropriate keys. This may require a custom API page or codeunit to handle the logic.
Create a Custom API Page
If your scenario involves creating both the journal line and the attachment via API, consider building a custom API page that:
Use the Media or MediaSet Data Types
For file uploads, use Media or MediaSet fields in your custom API page to handle incoming documents. Ensure the page is properly exposed and published in the Web Services page.
Security and Permissions
Ensure that the Entra Application or user making the API call has the necessary permissions to access and modify both the journal lines and the attachment records.
If this response helps resolve your issue, please consider marking it as accepted so it may assist others with similar requirements.
Best regards.
Jeffrey Bulanadi
3,878
Sohail Ahmed
3,583
Super User 2025 Season 2
Jainam M. Kothari
3,175
Super User 2025 Season 2