Export (0) Print
Expand All
Expand Minimize

Purchase Order Document

Dynamics AX 2009

This topic describes the purchase order service and document and the associated business logic in Microsoft Dynamics AX.

Enables external systems to retrieve purchase orders.

  • Outbound (sent by Microsoft Dynamics AX)

The following service operations are exposed by the document service:

  • find

  • findKeys

  • read

The following objects are associated with the purchase order service.

Object

Description

Service class

PurchPurchReqService Class

External service name

PurchaseRequisitionService

Axd <Document> class

AxdPurchaseRequisition Class

Ax <Table> classes

AxVendPurchOrderTrans Class

AxInventReportDimHistory Class

AxDocuRef Class

AxTaxJournalTrans Class

AxFormLetterRemarks Class

Query

AxdPurchaseRequisition

NoteNote

The AxInventReportDimHistory class is used in the query but not in the AxdPurchaseRequisition document.


Outbound

A purchase order is automatically sent electronically when it is posted if the order has been configured in AIF. A purchase order can be sent multiple times by navigating to Accounts payable > Inquiries > Journals > Purchase order and clicking the Send electronically button.

Inbound

N/A

Restrictions

Table Relationships

Note Field Handling

The outbound purchase order document can contain form notes and remarks. Tables that contain form notes include the following:

  • DocuRef

  • FormLetterRemarks

The following relations between the DocuRef table and other tables must be respected when you integrate purchase order documents.

Adding Notes to the Purchase Order Header

DocuRef.RefRecId = VendPurchOrderJour.RecId

DocuRef.RefTableId = VendPurchOrderJour.TableId

DocuRef.RefCompanyID = VendPurchOrderJour.DataAreaId

DocuRef.TypeId = VendFormLetterDocuments.DocuTypePurchOrder

DocuRef.Restriction = "External"

VendFormLetterDocuments.DocuOnPurchOrder = "Header" or "All"

Adding Notes to the Purchase Order Lines

DocuRef.RefRecId = VendPurchOrderLine.RecId

DocuRef.RefTableId = VendPurchOrderLine.TableId

DocuRef.RefCompanyID = VendPurchOrderLine.DataAreaId

DocuRef.TypeId = VendFormLetterDocuments.DocuTypePurchOrder

DocuRef.Restriction = "External"

VendFormLetterDocuments.DocuOnPurchOrder = "Line" or "All"

NoteNote

Only notes of the type "Note" will be included in the sent purchase order.


Required Fields

For a purchase order document to be a valid business document, the following fields must contain a valid value. Validation of the required fields is performed by the business logic in the Ax<Table> classes.

  • CompanyId

  • VendPurchOrderJour.OrderAccount

  • VendPurchOrderJour.PurchId

  • VendPurchOrderJour.DeliveryAddress

  • Item line (there must be at least one item line)

    • VendPurchOrderTrans.ItemId

    • VendPurchOrderTrans.Qty

    • VendPurchOrderTrans.PurchUnit

    • VendPurchOrderTrans.DeliveryDate

    • VendPurchOrderTrans.CurrencyCode

Excluded Fields

Field Defaults

Constraints

Entity Key

VendPurchOrderJour.RecID

Only purchase orders with a status of Open Order can be sent electronically.

The security key is found on the Permissions form under Accounts payable > Services > PurchPurchReqService. The key name is PurchPurchReqService.

Trading Partner Identification

Trading partner identification for the purchase order document is determined by the following values:

  • Partner Type - The value of the Partner Type field is set by the AxdPurchaseRequisition class to "Vendor."

  • Partner ID - The Partner ID is derived from the VendPurchOrderJour.OrderAccount field.

Community Additions

ADD
Show:
© 2015 Microsoft