The Infolog

A blog of Dynamics AX development tips and tricks

Skip to: Content | Sidebar | Footer

Tag: X++

Creating a lookup to AOT objects

31 January, 2017 (15:16) | Dynamics 365 for operations | By: Howard Webb

In the past we could use the table UtilElements to get a list of AOT objects. In 365 for Operations that is no longer possible as the table contains no data. Microsoft have provided us with a way of accessing the metadata of the AOT though. There are a number of methods under the class Microsoft.Dynamics.Ax.Xpp.MetadataSupport which […]

Create a lookup using an extension

31 January, 2017 (15:05) | Dynamics 365 for operations | By: Howard Webb

Form lookups  are nothing new in AX, and the patterns are the same in Dynamics 365. However sometimes we need to use a form extension which does not allow us to add a method directly on the form object. Instead we need to create an event against the form control to change the lookup. This […]

Creating a lookup to a field ID

5 December, 2016 (21:45) | Dynamics AX | By: Howard Webb

Sometimes we might want to allow the end user to select a field from a table within a form, for example if we are parameterizing the mapping values. To do with we will need the following items:   A field to hold the field ID (EDT FieldID) A edit method on the form datasource A […]

Filter options for a date effective table

5 December, 2016 (21:19) | Dynamics AX | By: Howard Webb

As standard if we have a form that uses a datasource that is linked to a date effective table we will only see the current record. In AX we can give the user a new button in the action pane which allow them to change that and show the records they need or want. To […]

Dynamics AX 7: Form extensions and event handling

26 August, 2016 (11:13) | Dynamics AX | By: Howard Webb

As I’ve just got my hands on AX 7 I wanted to do a little exercise that allowed me to work with form extensions and also the new event handlers. The task I attempted was to add a small street view thumbnail to the address grid that will show the view of the address. Unfortunately, […]

Creating a Load and shipment from a sales line

26 January, 2016 (15:00) | Dynamics AX | By: Howard Webb

I’ve recently been asked to develop a mod to create a load, load line and a shipment for a SalesLine record from code. I had a quick look and could not see anything on the internet so below is the code I used. Sadly it seems that the shipment table does not have any init […]

Using the SysOperationFramework

11 January, 2016 (11:41) | Uncategorized | By: Howard Webb

As we all know that moving forward we should really be making better use of the SysOperationFramework. Having a little more time over xmas I decided to use the framework in a mod I was doing. The mod called for a new export to excel without using BIS. There is a Microsoft white paper about […]

Validate if a string is a hex value

4 December, 2015 (20:16) | Dynamics AX | By: Howard Webb

I’ve recently needed to validate if a string was a colour hex value. There was not a standard method I could find to check (although I am convinced there must be a .net class I can use) but as speed was of the essence I wrote my own:    

Creating a configured sales line

15 September, 2015 (09:59) | Dynamics AX | By: Howard Webb

Recently a customer has asked us to develop a way to produce a sales line which contained an item that fully configured via product configurator. For those that are unaware of the process if an item is selected that is configurable you can answer a number of “questions” to allow configuration of an item via […]

Adding a range to the query that SalesEditLines form uses

12 June, 2015 (14:41) | Dynamics AX | By: Howard Webb

When posting an invoice, delivery note…etc. from a sales order a common form is used called SalesEditLines:     This form is quite complex and uses several framework classes to build itself and the data within it. Recently I was asked to add a new range to the query that builds the results in the […]