Thanks for using MS Q&A platform and posting your query.
The error message you're getting "An unexpected instance annotation name 'No.' was found when reading from the JSON reader" indicates an issue with the structure of your JSON request body. In OData, instance annotation names must start with "@".
Here are some steps you can take to troubleshoot the issue:
Check the schema definition of your PurchaseLinesTempTable in Business Central: Make sure the field you're referring to as "No." is actually a field in the table and not an annotation. If it's an annotation, remove it from your JSON payload.
Ensure proper JSON formatting: Double-check that your JSON data is formatted correctly. There should be no extraneous characters or quotes around the field names. Use a JSON formatter or validator to ensure your JSON is well-formed.
- Verify casing: Be cautious of casing in your field names. OData is case-sensitive, so make sure the field names in your JSON payload match the casing of the fields in your Business Central table.
- Error 404 in External Call in Data Flow: This error usually indicates that the server could not find the requested resource. In the context of Azure Data Factory, it could mean that the URL or the body of the request is not correctly formed. You can try to use the “Import projection” in the Output tab of the external call transformation. Azure Data Factory will automatically detect the schema of the API call and the Body type expression will be auto filled.
- Unexpected Instance Annotation Name ‘No.’ Error: This error typically occurs when there is incorrect Dynamic content referenced In OData, Instance annotation name must start with @. You might want to check the request body and ensure that the instance annotation names are correctly formatted.
Here are some additional resources that you might find helpful:
- Posting data to Business Central: https://learn.microsoft.com/en-us/training/dynamics365/business-central
- HttpClient.Post Method: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/httpclient/httpclient-post-method
If you're still having trouble after following these steps, please do let us know.