Month: March 2014

AX 2012: Packing Slips

Posted on Updated on

Business Purpose

When a sales order is ready to be picked, a picking list is created. Warehouse employees pick items from the inventory and prepare them for shipment. When the order has been shipped, a packing slip is sent from the warehouse to get it posted in Dynamics AX against that particular sales order which triggers the order status to be updated.

The document direction is inbound i.e. it is received by Dynamics AX. New packing slips are received and posted through the Posting packing slip form.

Generate Sales Order Packing Slip

  1. Open Sales and marketing > Common > Sales orders > All sales order.
  2. Select the sales order to generate the packing slip.
  3. In the Pick and pack tab of the Action Pane, click Packing slip in the Generate group. The Packing slip posting form opens.
  4. In the Posting packing slip form, in the Quantity field, select the All option.
  5. Select the Print packing slip check box to print the packing slip.
  6. Click OK on the Posting dialog box.

If the quantities on the packing slip update equal the ordered quantities, the value in the sales order Status field changes to Delivered. If there is a back order on one or more items, the sales order status remains as Open order.

AX 2012: Price charges

Posted on Updated on

Untitled

A price charge is an amount that is added to the unit price of the item. This charge is usually used to cover Overhead costs incurred by the item unlike Direct Material or Direct Labor costs which are covered by the unit price of the item. Examples of the overhead costs could be setup, packaging, bundling and freight costs. Before we proceed further, please note that the following 3 fields play their role when it comes to apply charges to an item:

1. Price charges
2. Price quantity
3. Incl. in unit price

 

For setting up selling price charges, please go to:

Product information management → Common → Released products → Edit a Released Product → Sell FastTab1

For setting up purchase price charges, please go to:

Product information management → Common → Released products → Edit a Released Product → Purchase FastTab1

Charges can be setup in two ways:

1. Fixed Charge

Fixed charge is treated as independent of the quantity of the item. Whether line item quantity is 1, 2 or 3 a fixed charge is added to the unit price of the item and is reflected in the net amount field. An example is illustrated below:

Price: 11.00
Price Charges: 13.00
Incl. in unit price: Unchecked

Therefore the price on the order line is calculated as:

Unit Price = Price + Price Charges = 11.00 + 13.00 = 24.00

Untitled

 

Untitled

 

2. Variable Charge

Variable charge depends on the quantity of the item sold/purchased. Checking “Incl. in unit price” defines the charge to be treated as variable. In this case the Price Charges are first divided by the Price Quantity and then added to the unit price of the item in the order line. An example is illustrated below:

Price: 11.00
Price Quanity: 2.00
Price Charges: 13.00
Incl. in unit price: Checked

Therefore the price on the order line is calculated as:

Unit Price = Price + (Price Charges/Price Quantity) = 11 + 13/2 = 17.50

In this way we can equally distribute the price charges among each of the item units ordered.

Untitled

 

Untitled

 

 

 

 NOTE: Any Trade Agreements that are setup for a vendor override the price/discount specifications on an item.


1Navigation given is for Microsoft Dynamics AX 2012 R3. It could be different for a different version of AX

AX 2012: Managing Charges

Image Posted on Updated on

usagoldcoins

*Charges (in former releases called “Miscellaneous charges”) in sales and purchase orders are available to cover expenses, which are not included in the price shown in the order for example costs for freight, transport, postage, insurance, recycling and packaging.

You can set up charges so that they are included in sales and purchase transactions automatically or you can add them manually to the orders to accommodate one-time charges. Charges are available at the header and line levels. Please note that charges are only applicable to Sales Orders (SO) and Purchase Orders (PO).

There are three ways to apply charges in AX 2012:

1. Price charges
Choose when you want to setup charges for a specific item and when charges should be billed each time the item is traded. For details read this post:

https://dynamicsaxinsight.wordpress.com/2014/03/24/ax-2012-price-charges/

2. Manual charges
Choose when you want to add charges manually to the header or line of a sales or purchase order. This type of charge does not use a charge code. For example, one-time fee charged for special packaging.

https://dynamicsaxinsight.wordpress.com/2014/05/10/ax-2012-manual-charges/

3. Automatic charges
Choose when you want to apply charges automatically whenever user creates a sales order or purchase order.

AX 2012: How to view batch jobs running

Posted on Updated on

After triggering the batch job, go to System Administration > Inquiries > Batch jobs and open Batch jobs form. Here you can see your batch job queued for execution. If you want to expedite running your batch job, you can change the status to Withhold of jobs queued to run before your job.

To change the status of any job go to Functions > Change Status. You can also see the log entries against any job by selecting the job and then clicking the Log button.

Image

AX 2012: Batch Server Configuration

Posted on Updated on

To configure an AOS instance as a batch server go to System Administration > Setup > System and open Server Configuration form. Select the AOS instance to configure from the grid on the left. Check Is batch server to specify this instance as a batch server. Expand the fast tab Batch Server Schedule. Mention the Maximum batch threads along with start and end times.

Please note that maximum batch threads only controls how many concurrent threads will be running on this instance. You can create as many threads as you like in x++. For example, maximum batch threads is set to 20 and your x++ code is creating 30 threads to perform a job. In this case, first 20 out of 30 threads will be running concurrently while the remaining 10 threads will be in the waiting state till the first 20 threads finish their job.

You can specify multiple maximum batch threads and bind them to specific time slots using Start time and End time. In this way we can configure the same AOS instance to allow different maximum batch threads in different time slots. For example, in rush hours we can specify more concurrent threads as compared to idle hours!

Feel free to comment in case of any questions!

Image

AX 2012: Access Denied: SysOperationServiceController

Posted on Updated on

Recently I came across the following exception while executing a batch job via a menu item. The batch job has been written using the SysOperation Framework.

Exception:

Image

Resolution:

To fix this, please follow the steps below:

  1. Create Code Permission
  2. Link it with the menu item

Code Permission:

Image

Create a new code permission under AOT > Security > Code Permissions. Add a server method for the newly created code permission. Specify the following properties for the server method added:

  • Class: Your SysOperation service class
  • Method: Method name to invoke
  • EffectiveAccess: Invoke
  • ManagedBy: Manual

Linking:

Image

Now link your code permission with the menu item which is used to trigger the batch job. Use LinkedPermissionType and LinkedPermissionObject properties to achieve it! This should be resolving the exception.

AX 2012: How to debug batch jobs and service operations?

Posted on Updated on

Untitled

All the batch jobs and service operations now run in the managed code (IL) and therefore breakpoints set in x++ do not get hit as expected! Instead you should be setting breakpoints in the IL code in Visual Studio. Here are the steps you would be following to do so:

1. Open Visual Studio as an Administrator and go to Tools > Options > Debugging > General. Make sure “Enable Just My Code (Managed Only)” is unchecked.

Image

2. Go to Debug > Attach to Process. Click “Select…” and check the appropriate version of the managed code in your case.

Image

3. Check both options at the bottom of “Attach to Process” form. Select Ax32Serv.exe from the list of processes.

Image

4. Load the XppIL source file in Visual Studio now. Make sure you have enabled breakpoints to debug x++ code in the AX Server Configuration Utility. You can find these files under a location similar to the following:

C:\Program Files\Microsoft Dynamics AX\6.3\Server\AxaptaDev\bin\XppIL\source

5. Now set the breakpoint at any of the desired statement.

Image

6. Finally, trigger the batch job or service operation to debug in the AX Client. The breakpoint set in Visual Studio should be hitting now! Make sure to generate IL to reflect the changes in the XppIL source files after updating the x++ code.