microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
732 stars 243 forks source link

Business Central API v1.0 PATCH picture BadRequest_InvalidToken #5897

Closed louagej closed 4 years ago

louagej commented 4 years ago

Describe the bug According the Microsoft Docs, we should be able to update an item picture trough the default API: Update picture

Unfortunately an error is thrown

Could not validate the client concurrency token required by the service. Please provide a valid token in the client request. CorrelationId: 8dbb4ed0-73d4-45c6-b5b1-efa0e9512563.

To Reproduce Steps and to reproduce the behavior:

  1. Create a API GET Request on the photographed Item: GET businesscentralPrefix/companies({id})/items({id}) 2020_05_19_004

  2. Use ID to retrieve picture url: GET businesscentralPrefix/companies({companyId})/items({itemId})/picture image

  3. Use content@odata.mediaEditLink to update or create a picture for this item: PATCH businesscentralPrefix/companies({companyId})/items({itemId})/picture({pictureId})/content

  4. Error in response : Could not validate the client concurrency token required by the service. Please provide a valid token in the client request. CorrelationId: 8dbb4ed0-73d4-45c6-b5b1-efa0e9512563. image

Expected behavior An update or creation of an item picture.

5. Versions:

atoader commented 4 years ago

Hi! Please take a minute to read the guidelines for this repository https://github.com/microsoft/AL and our collection of frequently asked questions https://github.com/Microsoft/AL/wiki/frequently-Asked-Questions .

As this repository is only for issues related to the AL compiler in latest developer preview environment for Dynamics 365 Business Central. We suggest that you open a support case or file a bug in Collaborate, to ensure that all Business Central users benefit from your catch as soon as possible.

To open a support case, you can:

If you file the bug in Collaborate, remember to include steps to reproduce the issue, and the Business Central build number and country version you're using.