AL icon indicating copy to clipboard operation
AL copied to clipboard

Metadata Breaks: API - DEEP INSERT ISSUE / ODATA API

Open AbdullahSatti opened this issue 2 years ago • 7 comments

Please include the following with each issue:

1. Describe the bug

I have custom tables and pages to receive data (Orders) from third party in business central. The structure of Tables and Pages are same as Sales Header and Sales Lines. These API pages were working fine for past 2 years. I've been facing an issue from past three weeks that Business Central is rejecting orders. Sometimes it works perfectly, sometimes automatically throws an error (400-Bad request)

Error description is : Could not find a property named 'salesLines' on type 'Microsoft.NAV.salesOrder'. CorrelationId: fcca879e_a0cf_44ee_874f_8e2e00e4d52c.

Error screenshot image-20230922145902-1

The metadata gets changed. The link (Part) between Custom Header and Custom Lines breaks. Once metadata is changed then it keeps rejecting new data (Order) to sync with BC, but after some time it start working again by itself.

This issue occurs for on-prem and SAAS both.

Link of Question in Community

2. To Reproduce I don't know how to reproduce issue. As I don't know how to change metadata of salesLines.

When metadata is not changed image-20230922150906-7

When metadata is changes image-20230922151053-8

Header API page properties

image-20230922145942-2

Subforum API page properties

image-20230922150006-4

This is the link between 2 API pages.

image-20230922145958-3

3. Expected behavior When metadata is working fine it create orders(Send data) in Business central. But whenever metadata gets disturbed then it through error towards third party.

4. Actual behavior Data should be sync to business central and it was working fine for last two years.

5. Versions:

  • AL Language: v11.7.863928
  • Visual Studio Code: 1.82.2 (user setup)
  • Business Central: DK Business Central 22.5 (Platform 22.0.60723.0 + Application 22.5.59966.60134)
  • List of Visual Studio Code extensions that you have installed: There are lot of extensions but this issue is related to API data sync with business central.

AbdullahSatti avatar Sep 26 '23 10:09 AbdullahSatti

Our customer saw an issue like this (API integration was working find, then one day HTTP 400 Bad Request, but only when salesLines was used), and a support ticket was raised in the end and they responded on 29 September with

“The product team found the root cause. It’s a concurrency issue where in rare cases the server could concurrently load metadata resulting in SOAP API failures. We identified that the list of web services is being cached, but the evaluation of the actual list of web services can be performed outside of the lock. This enables multiple threads to run a non thread-safe logic. Product team has logged as a bug. A hotfix is being prepared and will be rolled out.”

naradae avatar Oct 03 '23 21:10 naradae

@AbdullahSatti can you try again? A change is being rolled out that should solve your challenge. If you continue to have issues please open a support ticket for this runtime scenario.

To open a support case, you can:

  • Open a support request to CSS through the PartnerSource portal
  • Contact your Service Account Manager (SAM) in your local subsidiary to understand what is included in your contract as of support incident and PAH (Partner Advisory Hours). Your SAM might also direct you "step by step" how to open a support request or how to get credentials, if this is the first time for you or your company

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.

SBalslev avatar Oct 06 '23 14:10 SBalslev

Thanks for your reply @SBalslev I will try if I get error again or not. Can you please mention in which release and version changes are roll out?

ghost avatar Oct 06 '23 15:10 ghost

Hi @SBalslev this error still appears in my BC version My business central version is 22.5 image

Can you please let me know in which release issue is resolved?

ghost avatar Oct 19 '23 12:10 ghost

The above mentioned issue is still issue after upgrade to 23.1!!! Can you please guide what is next?? What steps are taken to over the problem?

@AbdullahSatti can you try again? A change is being rolled out that should solve your challenge. If you continue to have issues please open a support ticket for this runtime scenario.

To open a support case, you can:

  • Open a support request to CSS through the PartnerSource portal
  • Contact your Service Account Manager (SAM) in your local subsidiary to understand what is included in your contract as of support incident and PAH (Partner Advisory Hours). Your SAM might also direct you "step by step" how to open a support request or how to get credentials, if this is the first time for you or your company

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.

ghost avatar Dec 05 '23 04:12 ghost

Hi @AbdullahSatti did you resolve this issue? I also got the same problem

GITSConsulting avatar Dec 29 '23 07:12 GITSConsulting

Unfortunately, it is not resolved yet. 2,3 reached out to me for this issue and they are also facing same issue. You should also raise support ticket to MS. If anyone figure out problem, please specify solution here.

ghost avatar Dec 29 '23 08:12 ghost

Hi, this issue is out of scope of for this repository. You should do one of the following:

  • Open a support request to CSS through the PartnerSource portal
  • Open a bug in Collaborate
  • Contact your Service Account Manager (SAM) in your local subsidiary to understand what is included in your contract as of support incident and PAH (Partner Advisory Hours). Your SAM might also direct you "step by step" how to open a support request or how to get credentials, if this is the first time for you or your company

As a reminder, this repository only handles issues to do with the compiler or VSCode development experience for AL.

thloke avatar Apr 10 '24 01:04 thloke