The workflow process moves purchase requisitions through the review process, from an initial status of Draft to a final status of Approved. When a purchase requisition is submitted for review, the workflow process is started. After a purchase requisition is approved, a purchase order can be generated for the purchase requisition lines and submitted to the vendor for order fulfillment.
We will use AIF standard service for import PR from outside, service name PurchReqImportService.
in AxPurchReqTable class and setPurchReqId() method
Base on this method, you could know how System get PurchReqId.
How to do
Go to Inbound ports form to create new service with NETTCP adapter, choose service operations likes below:
Then active AIF inbound service
Consume Pruchase requisition service
Open visual studio and create new console project.
I’m trying to create product/master product in Dynamics AX using AIF inbound port, the AIF services consume by C#.NET.
From AX 2012 R2, Item is replaced with Product. Item master was in Inventory Management Module, now there is a separate module for item/product creation Product information Management.
Some definitions you should know
There are two types of Products in 2012 they are:
Product information management/Common/Products/Products
Product information management/Common/Products/Products master
To create a product variant, you must define at least one product dimension for a product master. You can also rename dimensions.
To create product variants, you must complete the following tasks:
Set up dimensions, such as size, color, and style.
Set up variant groups.
Assign variant groups to a retail hierarchy.
Create a product master and variants.
b. Product dimensions
Product dimensions are characteristics that serve to identify a product variant. You can use combinations of product dimensions to define product variants. You must define at least one product dimension for a product master to create a product variant.
Normally in AX, we create items master follow process:
Assigning Item Model Group & Item Groups to a Product Master
How to do:
Ax provides us standard services for this purpose, so we don’t need to create any custom services for this. I will use 4 services for this purpose, descriptions below
Create products (all types). The service can also be used to retrieve data that has already been created (Create Product details in The EcoRes tables).
Specify values of product dimensions for a product master. These values become available for the creation of product variants. The service can also be used to retrieve data that has already been created.
Release distinct products and product masters. The service can also be used to retrieve data that has already been created.
Release product variants. The service can also be used to retrieve data that has already been created.
we have 4 steps
Create 4 AIF inbound services against Services operation above and active it
After services creation, open visual studio then creates new Console project and add service References for that, you will get somethings like pic below:
Using C#.Net to consume service
this method can use to release a distinct product or a product master
Release product Variants
Just for example, in main I only create Distinct product and release it, but you can use another method to create master, variant, masterDim and so on.
4. Try to run it and here is a result
Thank you for reading and feel free to give me a question.