Skip to main content What is Dynamics 365? Guided tours Customer stories Try our products Build your own agents CRM ERP Sales Service Sales Customer Insights Customer Service Contact Center Field Service Supply Chain Management Commerce Finance Project Operations Human Resources Business Central Pricing Business application topics Training & certifications Migrate to the cloud Documentation Events Dynamics 365 Blog Product updates Onboarding and implementation Community Find a partner Software Development Companies Partner resources Microsoft Marketplace Product documentation Technical support On-premises product support Contact us Try for free Sign in

Sometimes when a user tries to save an invoice line or submit a PO he gets error: ” An error occurred during update. The State of the source document or source document line could not be updated”

The following query in this scenario triggers a query that access the TaxUncommited table.

            select
crossCompany * from sourceDocumentLineMap

                where sourceDocumentLineMap.SourceDocumentLine == this.RecId;

When the crossCompany keyword is present, the data access stack will check to see if the user has access to this table through any of its roles. Since none of the roles have permission to this table, the permission check will return NoAccess, and therefore the query doesn’t return any result.

To fix this issue you need to add the Read permission to table TaxUncommited for the Purchasing Agent role

Get started with Dynamics 365

Drive more efficiency, reduce costs, and create a hyperconnected business that links people, data, and processes across your organization—enabling every team to quickly adapt and innovate.