web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Debug Odata Pages Error Message

(0) ShareShare
ReportReport
Posted on by 60

Hi all,

I am trying to POST a PurchaseOrderConfirmation using the standard ODATA data/PurchaseOrderConfirmationHeaders endpoint.

I receive a error message I do not understand at all:

"Write validation failed for table row of type 'PurchPurchaseOrderConfirmationHeaderEntity'. Infolog: Warning: Field 'Purchase order confirmation' must be filled in.."
This will probably be not the last time I run into an issue I do not find in the forum.
So my question is how I can debug this?
Is there a way to clone the code of the Odata Page endpoints (like there is in BusinessCentral for example)?
Thanks a ton for your help!
Sven
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,171 Super User 2025 Season 2 on at

    Hi Sven,

    The entity you mention is read-only by default. Can you tell how you try to write to this entity?

  • SvenB Profile Picture
    60 on at

    Hi André,

    thanks for taking the time.

    I am trying to create a PurchaseOrderConfirmation for a given PurchaseOrder using a Post endpoint. I hope this does the same thing as clicking the "confirm" action in "all purchase orders".

    After I will try to add lines to the created confirmation.

    More specifically I am using the URL /data/PurchaseOrderConfirmationHeaders

    with the body:

    {
    "dataAreaId": "usrt",
    "PurchaseOrderNumber": "001693",
    "ConfirmationDate": "2022-07-15T12:00:00Z"
    }
    Greetings,
    Sven
  • Suggested answer
    YY Lim Profile Picture
    960 on at

    Hi Sven,

    What Andre mentioned this data entity is read only, for data export and reading.

    If I understand you correctly, you would like to trigger the posting of purchase order confirmation, this entity is providing you posted purchase order confirmation.

    What you could do is write an OData action by passing the parameter such as your PO and date as per above then post the purchase order confirmation. Of course you have other way to achieve this, but this is one of it you could use OData.

    You could refer to BatchJobEntity for example, there is a OData action method there, you then can write some code like this in the method (roughly like this, please test the code yourself)

    purchTable = PurchTable::find(yourPurchId);
    purchFormLetter = PurchFormLetter::construct(DocumentStatus::Confirmation);
    purchFormLetter.TransDate(YourDate);
    purchFormLetter.update(purchTable);

  • SvenB Profile Picture
    60 on at

    Hi Yuan,

    thanks for the pointers. I have only written code for business central in the past.

    How to I get started writing code for F&O? Is there any documentation of where I can find the existing repository?

    Are there libraries on Vscode?

    Thanks for helping me get startetd.

  • YY Lim Profile Picture
    960 on at

    Hi Sven,

    At this moment, you could download a VHD from LCS deploy locally or connect your azure subscription to deploy a development machine in order for you to start the development, personally I would suggest cloud hosted rather than VHD as it is easier to maintain/update/delete/redeploy.

    If you are working on a project, you would like to connect to DevOps repository to get the latest code of the project first, make sure you dev machine version is either same (better) or lower version than your testing/production.

    There are few things like arm deployment access to the azure and etc, you can refer here on how to setup dev machine, not the best but at least some guidance.

    docs.microsoft.com/.../access-instances

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 467 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans