>

Category Archives: Dynamics AX

Common prefixes in Microsoft Dynamics AX

 

Prefix Description
As Microsoft Dynamics AX typed data source
Axd Microsoft Dynamics AX business document
Asset Asset Asset management
BOM Bill of material
COS Cost accounting
Cust Customer Customer
Dir Directory, global address
EcoRes Economic resources
Human resources Human resources
Invent Inventory management
JMG Shop floor control
KM knowledge management
Ledger General Ledger
PBA Product builder
Prod Production
Proj Project
Purch Purchase
Req Requirements
Sales Sales
SMA Service management
SMM Sales and marketing management also called customer relationship management (CRM)
Sys Application frameworks and development tools
Tax Tax engine
Vend Vendor
Web Web framework
WMS Warehouse management

Walkthrough: Creating a Workflow Template AX 2009

In Microsoft Dynamics AX, you define a workflow by creating a template to base the workflow on. In this walkthrough, you will create a workflow template in the Application Object Tree (AOT) that you can add approvals and tasks to.

A workflow template defines information about:

  • Which workflow document to use. The workflow document exposes calculated fields and identifies the query that exposes data fields for the workflow.
  • Tasks and approvals that can be configured by the end user.
  • Workflow categories used for assigning a workflow template to a specific module.
  • Menu items and event handlers.

This walkthrough illustrates the following tasks:

  • Create a workflow template in the AOT.
  • Create a query to expose data for conditions.
  • Create a workflow document class to identify the query and calculated fields.
  • Bind the query to the workflow document class.
  • Bind the workflow document class to the workflow template.
  • Create a workflow category.
  • Bind the workflow category to the workflow template.
  • Create a SubmitToWorkflow menu item.
  • Bind the workflow menu item to the workflow template.
  • Set a license configuration key for the workflow template.

Prerequisites

 

To complete this walkthrough, you will need:

  • Microsoft Dynamics AX
  • A license file that has access to the MorphX development environment
To create a workflow template in the AOT
  1. In the AOT, expand the Workflow node.
  2. Right-click the Workflow Templates node, and then select New Workflow Template. A workflow template group displays under the Workflow Template node.
  3. Right-click the new workflow template and then click Properties.
  4. In the Properties sheet, set the Name property to MyWorkflowTemplate.
  5. In the AOT, right-click MyWorkflowTemplate, and then click Save.

After the workflow template is created, you can create the objects that you need to bind to the workflow template. For this walkthrough, the next step is to create a query to identify the table data fields used for the workflow document.

To complete Article click here

How to Reverse a PO Invoice in Dynamics AX

You have to create a debit note from your purchase order that will be settled against your PO invoice to essentially cancel that balance on the vendor profile.

To process the debit note,

1- Add a new line on your PO with a negative quantity.

2- Confirm.

3- Post invoice.

You will need to go on the vendor profile to settle the original invoice with the new debit note so that balance will be gone from the vendor profile.

How to post PO by Code in Dynamics AX

I have task to integrate Dynamics AX with another application by posting PO from out side Dynamics AX, so I used AIF and build new web service to be used from out of AX and call the method below to post PO (packing slip, or invoice) .

public str CreatePostProductReceipt(PurchId _PurchId, Num _PackingSlip, ItemId  Itemid, Qty qty,
InventSiteId  InventSiteId =”, InventLocationId  InventLocationId= ” , inventBatchid batchid = ”, InventSerialId  serialId = ”, inventsizeId inventsizeId =”, InventColorId InventColorId =”)
{
PurchFormLetter             purchFormLetter;
PurchParmUpdate             purchParmUpdate;
PurchParmTable              purchParmTable;
PurchParmLine               purchParmLine;
PurchTable                  purchTable;
PurchLine                   purchLine;
PurchId                     purchId;
Num                         packingSlipId;
InventDim                   inventDim;
str                 ret=”;
System.Exception    err;
;

packingSlipId   = _PackingSlip;
purchTable      = PurchTable::find(_PurchId);

ttsBegin;
try
{
// Create PurchParamUpdate table
purchFormletter = PurchFormLetter::construct(DocumentStatus::PackingSlip); // to post invoice change to DocumentStatus::invoice

purchFormLetter.createParmUpdate(true);

purchParmUpdate = PurchFormLetter.purchParmUpdate();

// Set PurchParmTable table
purchParmTable.clear();
purchParmTable.TransDate                = SystemDateGet();
purchParmTable.Ordering                 = DocumentStatus::PackingSlip;
purchParmTable.ParmJobStatus            = ParmJobStatus::Waiting;
purchParmTable.Num                      = packingSlipId;
purchParmTable.PurchId                  = purchTable.PurchId;
purchParmTable.PurchName                = purchTable.PurchName;
purchParmTable.DeliveryName             = purchTable.DeliveryName;
purchParmTable.OrderAccount             = purchTable.OrderAccount;
purchParmTable.CurrencyCode             = purchTable.CurrencyCode;
purchParmTable.InvoiceAccount           = purchTable.InvoiceAccount;
purchParmTable.ParmId                   = purchParmUpdate.ParmId;
purchParmTable.insert();

// Set PurchParmLine table
while select purchLine
where purchLine.PurchId == purchTable.purchId && purchline.ItemId == Itemid
{
purchParmLine.InitFromPurchLine(purchLine);

inventDim = purchline.inventDim(true);

// Set batch and serial number
if(InventSiteId != ”)
inventDim.InventSiteId = InventSiteId;

if(InventLocationId != ”)
inventDim.InventLocationId = InventLocationId;

if(batchid != ”)
inventDim.inventBatchId = batchId;

if(serialid != ”)
inventDim.inventSerialId = serialID;

if(inventsizeId != ”)
inventDim.inventsizeId = inventsizeId;

if(InventColorId != ”)
inventDim.InventColorId = InventColorId;

purchParmLine.InventDimId = inventDim::findOrCreate(inventdim).inventDimId;

purchParmLine.ReceiveNow    = 1 ; //PurchLine.PurchQty;
purchParmLine.setInventReceiveNow();
purchParmLine.ParmId        = purchParmTable.ParmId;
purchParmLine.TableRefId    = purchParmTable.TableRefId;
purchParmLine.setQty(DocumentStatus::PackingSlip, false, true);
purchParmLine.setLineAmount();
purchParmLine.insert();
}

ttsCommit;
purchFormLetter = PurchFormLetter::construct(DocumentStatus::PackingSlip);
purchFormLetter.transDate(systemDateGet());
purchFormLetter.proforma(false);
purchFormLetter.specQty(PurchUpdate::PackingSlip);
purchFormLetter.purchTable(purchTable);

// This is the ID we hard code as the product receipt ID, if we do the posting via UI
// user would have the option to manually enter this value
purchFormLetter.parmParmTableNum(purchParmTable.ParmId);
purchFormLetter.parmId(purchParmTable.ParmId);
purchFormLetter.purchParmUpdate(purchparmupdate);
purchFormLetter.run();
return “OK”;
}
catch (Exception::CLRError)
{
err = CLRInterop::getLastException();
ret = err.ToString();
return ret;
}
Return “Error”;
}

How to: View the History of an Object in AOT – Dynamics AX

If you use version control (There another is another post about Version Control ), you can view the history of an object in the Application Object Tree (AOT).

View the history of an object
  • In the AOT, right-click an object, and then click History.or

    In the AOT, click the History button.

Compare versions of an object

  1. In the AOT, right-click an object, and then click History.or

    In the AOT, click the History button.

  2. Select the versions of the object to compare and then click Compare.
  3. Optionally click the Advanced tab and select advanced options.
  4. Click Compare.

View the change list

  • From the Microsoft Dynamics AX menu, point to Tools, point to Development tools, point to Version control, point to Inquiries, and then click Changes.
Follow

Get every new post on this blog delivered to your Inbox.

Join other followers:

error: Content is protected !!