≡ Menu

In very basic level we can divide the Sale order into following steps



  1. Create New Customer
  2. Create a Sale order
  3. Pick the Sale Order
  4. Pack the Sale order
  5. Invoice the Sale Order

Login in to Ax






On successful login dashboard page is open in web browser.



Change legal entity from top menu to USMF

Change legal entity

We can create sales order from either Sales and marketing and Account Receivable module


Click on top menu.



Select Account Receivable menu

account Receviable


Or Sales and Marketing

Sales and marketing




Click on account receivable



Click on All customers

Customer List page link

Customer list page opens. Now click on new button to open customer form.


Customer List page

Enter Customer account for example I Added “MVP0007” as customer account And Name as Ali Raza Zaidi, select 80 in Customer Group.

Create Customer

In Address just select any Zip code for current article I Select 00210.

Sales Order Creation


Click on Save button, If you want to create Sales order directly click on Save and open then click on Sales Order.



Either you create new customer and then click on Save and open. Otherwise click on new Sales Order and select customer.


Select Customer selection for Sale order.


Select Customer


Select customer and save.




As we create very simple sale order so we select only one Item D0001 and set quantity 10 and also select change warehouse to 11.

Sales order create




Save the sale order

Save Sale Order


When the sales order is saved. The go to Sales Order tab => Generate=> Confirm Sales Order is enable. Click on it


Confirm Sales Order


Confirm Sales Order Form


Click on Ok.



You can find that status of Sales order is Open.

Sales Order Status




When Sale order is confirm. Select pick and Pack => Generate => Generate picking list.

Pick 1



Click on Ok.





After pick list Generation, Click on Pick and Pack => Generate => Picking list registration

Picking List registration

Click on Updates => Update All.







After that click on end of form click x to close.

Close Page


Then Click on Pick and Pack => Generate => Post Packing Slip.

Post Packing Slip

Confirm Pack List

Click ok, You find that Sale order status is now update to Delivered.

Delivered Status








After posting slip,  Click on Invoice  => Generate => Invoice

Invoice Menu


Invoice Posting


Click on Save.


Status is changed again to Invoice.




Hi, All today I got error while creating Leger entry

Cannot create a record in General journal entry (GeneralJournalEntry). Date: .The record already exists.

I found some issue with free sequence number in NumberSequenceList . I manually delete the free sequence number with following statement.

static void Job14(Args _args)
NumberSequenceList list;

while select forUpdate * from list where
list.NumberSequenceId ==5637145445 && list.Status ==NumStatus::Free



I got again got help from Andre answer on dynamics Ax community

Reference: https://community.dynamics.com/ax/f/33/t/138926


Couple of months ago, I have to face a strange error and its very strange solution. So I decide to share it and document so it helps others as well as I remember if I face it again.

Error occur when we try to create, edit or delete workflow. This error is certainly because of time zone. And As we are in Pakistan so certainly the Legal entity have to use local time zone.

But interestingly Workflow works fine in all other legal entity with same time zone. So what is problem with certain legal entity.

Short detail of error is as follow

‘Invalid enum value ‘GMTPLUS0500ISLAMABAD_KARACHI’ cannot be deserialized into type ‘Microsoft.Dynamics.AX.Framework.Workflow.Model.AxWorkflowServiceReference.Timezone



This error  occurs when following statement execute.

    workflowConfiguration = Microsoft.Dynamics.AX.Framework.Workflow.Model.WorkflowModel::

Create(templateName, curext(), curUserId(), domainUser);

As per my understanding we cannot debug framework classes. So We cannot get understand what cause problem.


After efforts, I found that this error is caused by time zone set in legal entity’s primary Address instead of legal entity’ own time zone.  I changed it to Central time zone US and Canada, Everything starts to working fine.  I am surprised, what logic required to create Workflow based on Primary Address time zone.







The detail error message is looked like

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.ServiceModel.Dispatcher.NetDispatcherFaultException: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org:response. The InnerException message was ‘Invalid enum value ‘GMTPLUS0500ISLAMABAD_KARACHI’ cannot be deserialized into type ‘Microsoft.Dynamics.AX.Framework.Workflow.Model.AxWorkflowServiceReference.Timezone’. Ensure that the necessary enum values are present and are marked with EnumMemberAttribute attribute if the type has DataContractAttribute attribute.’.  Please see InnerException for more details. —> System.Runtime.Serialization.SerializationException: Invalid enum value ‘GMTPLUS0500ISLAMABAD_KARACHI’ cannot be deserialized into type ‘Microsoft.Dynamics.AX.Framework.Workflow.Model.AxWorkflowServiceReference.Timezone’. Ensure that the necessary enum values are present and are marked with EnumMemberAttribute attribute if the type has DataContractAttribute attribute.


If we see description that problem is conversion between two time Zone. On comparison

I found time zone enum  “Microsoft.Dynamics.AX.Framework.WorkFlow.Model.AXWorkflowServiceReference.TimeZone” did not have GMTPLUS0500ISLAMABAD_KARACHI.








I have to explore Out of the box workflow status and comments.  After dig down, I found following three tables are important to get all information.







Reference of row on which workflow is applied or run can be found workflowTrackingStatusTable two field ContextRecid and ContextTableId


A few days ago, I got requirement, where I have to sum up the total quantity and amount of all Purchase line. Here we assume that All lines in Purchase order belongs to same set or convertible unit.

You can set these unit conversion settings at

Organization administration > Setup > Units > Unit conversions.




Public void SumQTYAndAmount(PurchTable  PurchTable)


PurchLine               line;



UnitOfMeasureSymbol     toSymbol ="Ranjah";

UnitOfMeasureSymbol     fromSymbol;

Qty                     SumQty=0;

AmountCur AmountPurch=0;

UnitOfMeasureRecId      fromRecid,toRecid;





select * from plan where plan.PurchTable == PurchTable.PurchId;


//  select sum(LineAmount), sum(QtyOrdered) from line where line.PurchId == PurchTable.PurchId;

while  select * from LineQty where LineQty.PurchId == PurchTable.PurchId


if ( LineQty.PurchUnit ==toSymbol)


SumQty +=LineQty.QtyOrdered;





fromSymbol = LineQty.PurchUnit;

toRecid =UnitOfMeasure::findBySymbol(toSymbol).RecId;

fromRecid =UnitOfMeasure::findBySymbol(fromSymbol).RecId;

landQty += UnitOfMeasureConverter::convert(landQty,fromRecid,toRecid,NoYes::Yes);