Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Creation of a Pending Vendor Invoice record through VendorInvoiceHeaderEntity worked in PU5 (1611), but doesn't work in PU8 (July 2017)

(0) ShareShare
ReportReport
Posted on by 792

Hey guys,

This is a bit technical question and I was sure of solving it myself because I thought it to be a minor mistake from my end. But then after investigation I sense it to be something that depends on Application version changes.

I was using standard data entity "VendorInvoiceHeaderEntity" to create records in Pending Vendor Invoice form (VendInvoiceInfoListPage). I wrote a .NET client application which would just call HttpWebRequest POST method to post the new record.

I used this JSON in the request body.

{
  "TermsOfPayment": "Cash",
  "InvoiceAccount": "1001",
  "InvoiceNumber": "Sagnik14Aug17Part5", //(this value might vary in pictures)
  "PurchaseOrderNumber": "000039"
}


Now this call when used in D365 Operations version 1611 (PU5), worked fine and created a new record and I can go into the record and see the headers' info. Pic attached:-

complain_2D00_fine2.png

complain_2D00_fine.png

But when I use this entity to create a new VendInvoiceInfoListPage record in D365 Fin & Ops version July 2017 Enterprise edition (PU8), it creates a new record alright, but when I select the record to go under it, it doesn't show any header information and a weird blank section is shown like this below:-

complain_2D00_error2.png

complain_2D00_error.png

I want to know why its not working in PU8 (i.e. Application version July 2017 Enterprise edition). I am using standard data entity as provided by Microsoft.

What is the specific differences regarding this data entity VendorInvoiceHeaderEntity and Pending vendor Invoice (Accounts Payable) section?

Thanks.

*This post is locked for comments

  • Verified answer
    Sagnik Majumder Profile Picture
    Sagnik Majumder 792 on at
    RE: Creation of a Pending Vendor Invoice record through VendorInvoiceHeaderEntity worked in PU5 (1611), but doesn't work in PU8 (July 2017)

    Okay, I seeked help from Microsoft on this topic and this is what they said:-

    We shouldn't pass PuchaseOrderNumber in the body while creating VendorInvoiceHeaders through OData service. We should only pass PurchaseOrderNumber (alongwith PurchaseLineNumber) while creating VendorInvoiceLines. This policy of MS has been applied from Enterprise Edition July 2017 onwards.

    I followed it and my whole issue is solved.

    Bingo!!!

  • Sagnik Majumder Profile Picture
    Sagnik Majumder 792 on at
    RE: Creation of a Pending Vendor Invoice record through VendorInvoiceHeaderEntity worked in PU5 (1611), but doesn't work in PU8 (July 2017)

    Hi Martin,

    Sorry to bother you again. But here are some of my latest findings regarding the issue which may help you in getting at the issue.

    I have tried POST-ing on the VendorInvoiceHeaderEntity of D365 FO Enterprise edition July 2017 (PU8) using the Postman tool and then also I could reproduce the issue.

    Steps:- 

    • Initially there is a single vendor invoice inside the VendInvoiceInfoListPage form.
    • In the Postman enter the URL and Authorization header like this. (We generated Authorization header using OAuth). Please note that this is a system data entity that we are using. It is VendorInvoiceHeaderEntity. Hence the URL is <D365 root url> + ‘/data/VendorInvoiceHeaders’.

    Next_2D00_inside_2D00_the_2D00_newly_2D00_created_2D00_entity_2D00_no_2D00_data.png 

    • Now we filled up the JSON body for the POST call.

    Next_2D00_postman_2D00_url_2D00_jsonbody.png 

    • Then we press SEND button and the call is made successfully. The response body is shown properly with ‘201 created’ status. 
    • In D365 FO, inside VendInvoiceInfoListPage (Pending Vendor Invoice) page, a new record is created.

    Next_2D00_new_2D00_record_2D00_created_2D00_in_2D00_VendInvoiceInfoListPage.png 

    • But when we click this entity and enter inside it (i.e. go to its details page), a blank document is shown like this with no header properties whatsoever. This is the issue!!!

    Next_2D00_inside_2D00_the_2D00_newly_2D00_created_2D00_entity_2D00_no_2D00_data.png

     

    And as I have already informed that, this same procedure works perfectly fine in D365 for Operations, version 1611 (PU5). 

    • Inside version 1611 (PU5), after POST-ing from Postman, the newly created invoice is present in the VendInvoiceInfoListPage form

    Next_2D00_PU5_2D00_new_2D00_record_2D00_created_2D00_in_2D00_VendInvoiceInfoListPage.png 

    • If we go inside this newly created record (details page), the whole Header properties are present (inside PU5) which is the expected behavior.

    Next_2D00_PU5_2D00_inside_2D00_the_2D00_newly_2D00_created_2D00_entity_2D00_data_2D00_present.png

    So I think definitely the problem is with D365 Finance & Operations Enterprise edition, July 2017 version.

    If you can call this OData endpoint (https://usnconeboxax1aos...com/data/VendorInvoiceHeaders) from your Postman in PU8 environment, you can also reproduce the issue. 

    If you have time can you try it? Or you may suggest any opinion?

  • Sagnik Majumder Profile Picture
    Sagnik Majumder 792 on at
    RE: Creation of a Pending Vendor Invoice record through VendorInvoiceHeaderEntity worked in PU5 (1611), but doesn't work in PU8 (July 2017)

    Let me formulate the issue again.

    After the POST call is made successful through the VendorInvoiceHeaderEntity, a new entry is created in the VendInvoiceInfoLisPage form (i.e. pending vendor invoice form). All fields are present in that entry except Purchase Order.

    PU8-_2D00_-details-view-_2D00_-error.png

    But when I click on that new entry to go into details page, I find a blank document with text "We didn't find anything to show here".

    PU8-_2D00_-details-view-_2D00_-error.png

    The Purchase Order field is populated by VendInvoiceInfoListPageView's PurchIds field which, when I opened the view in Application Explorer is blank. I am not sure why its coming blank.

    Otherwise I am quite clueless about the queries. I didnt quite find any differences between the form metadata (i.e. datasource, range etc) values of these two environments.

  • Martin Dráb Profile Picture
    Martin Dráb 231,307 Most Valuable Professional on at
    RE: Creation of a Pending Vendor Invoice record through VendorInvoiceHeaderEntity worked in PU5 (1611), but doesn't work in PU8 (July 2017)

    No, I'm talking about the problem that you don't see the record in the form. I don't mean comparing anything, I mean identifying why the query doesn't return the existing record. Is clearly filtered out by something, e.g. by a joined table without a related record. You can't fix it until you find out what's wrong.

  • Sagnik Majumder Profile Picture
    Sagnik Majumder 792 on at
    RE: Creation of a Pending Vendor Invoice record through VendorInvoiceHeaderEntity worked in PU5 (1611), but doesn't work in PU8 (July 2017)

    Are you talking about the Data entity structure? Should I compare the VendorInvoiceHeaderEntity data entity between the 2 environments (1611 & Enterprise edition July 2017)?

    Or, are you saying about the Pending Vendor Invoice forms (i.e. VendInvoiceInfoListPage and VendEditInvoice)? Should I compare these two forms between the two environments?

    Or else, which query are you referring to?

  • Martin Dráb Profile Picture
    Martin Dráb 231,307 Most Valuable Professional on at
    RE: Creation of a Pending Vendor Invoice record through VendorInvoiceHeaderEntity worked in PU5 (1611), but doesn't work in PU8 (July 2017)

    I suggest you look at the query - most likely the data is filtered out by a join or a range.

  • Sagnik Majumder Profile Picture
    Sagnik Majumder 792 on at
    RE: Creation of a Pending Vendor Invoice record through VendorInvoiceHeaderEntity worked in PU5 (1611), but doesn't work in PU8 (July 2017)

    Update: This same issue is reproduced in the latest platform update version i.e. PU9 as well. The application version of PU9 is same as that of PU8 (Enterprise edition July 2017). That may explain the cause of this same behavior.

  • Sagnik Majumder Profile Picture
    Sagnik Majumder 792 on at
    RE: Creation of a Pending Vendor Invoice record through VendorInvoiceHeaderEntity worked in PU5 (1611), but doesn't work in PU8 (July 2017)

    Just to also let you know that I did a comparative study on the newly created entry in the VendInvoiceInfoTable of the D365 in version 1611 (PU5) and Enterprise edition July 2017 (PU8) and didn't find anything worthy excepting that the recVersion in PU8 machine is 1 and in PU5 machine is a random number.

    Can you please check the standard data entity VendorInvoiceHeaderEntity in July 2017 enterprise edition (PU8) and assess why it's not working properly while trying to post a new invoice record? Is it a Microsoft bug?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans