Summary Update fields in AX2012

When processing sales order, or purchase order, posting you can control the summary updates. If you go into Accounts receivable->Setup->Accounts receivable parameters, then go to the tab, summary update, and press the summary update parameters, you can change the summary update fields.

If however the field you want is not present, you can add additional fields. This is done from the AOT, under the table SalesTable for sales orders, and PurchTable for purchase orders. Add the additional fields to what to use under the field group ‘SummaryUpdate’.

Creating employee records based on user accounts and linking them

When setting up a new system, people tend to spend lots of time setting up the various modules and creating user account. But what is often forgotten is to create employee records and link them to the users.

Below is a quick job that will create employee records for each user account, and link them. This script works on the basis that the user accounts have been allocated to the correct company as their default, and the name is the first and last name of the person. It also can filter out pre-defined users, and users allocated to company DAT, to hopefully get a clean employee set.

Continue reading

Linking AX Sessions with SQL SPIDs

It is useful to be able to link the DAX session numbers with the SQL SPID, especially if you want to diagnose who is causing locks, or long running queries. This is one method to get the information.

Before you can link the two pieces of information you need to enable an extra mode on the AOS server(s). On each AOS you want to review the DAX sessions against the SQL SPID you need to complete the following setup.

Continue reading

Updating the SID

While not a common activity, there are times you might moved your DAX database from one domain to another. This might be because of testing or because development is offsite. If this occurs you need to change the admin account in DAX to point to the new domain. Below are the steps needed to do this:

Continue reading

Strings and single quotes

When programming in DAX you can use both double quotes ” and single quotes ‘ to contain strings. You must use double quotes when using labels, but aside from that, functionally they work the same.

One consideration is the best practices. Personally I use compile level 4, which will flag up unused variables and lots of useful information to keep your code clean, but it also flags up strings that are not labels. This is often a problem with data migration scripts as you will often use strings, but wont want to create DAX labels for them. You also don’t want the best practice engine from flagging them up, so the best course of action is to use single quotes to contain the strings as this will not cause a best practice warning.

If when using single quotes and you want to include a single quote within the string, you need to ensure you use \’ where you want the single quote, as this will be interrupted as a single quote within a string.