Publications

Counting the number of records in a QueryRun

static void countRecords(Args _args) { Query q = new Query(); QueryBuildDataSource qbdsInventTable, qbdsInventDimCombination; QueryRun qr; Integer counter; Integer loops; Common common; qbdsInventTable =…

How to add new event type (Sales order)

1. Add new enumeration value to \Data Dictionary\Base Enums\MCROrderEventType Do not forget to leave a gap 2. Add new field to \Data Dictionary\Tables\MCROrderEventSetup of type Enum - NoYes In similar way as majority of fields in this…

Temporary Tables

Table types: Regular – a standard physical table InMemory – the type of temporary table which existed in the previous versions of Dynamics Ax. Such tables are held in memory and written to a local disk file once they grow beyond a certain…

Reread parent form datasources

FormDataSource formDataSource; FormRun callingForm; int dataSourceNo; Common callingRecord; super(); if (element.args().record().isFormDataSource()) { callingRecord = element.args().record().data(); callingForm = element.args().caller();…

Forms and company context

If you open form from X++ in different company you expect that it will work in the company you stated? TestForm is simple form without datasource and only one button which displays infolog with current company: Bad thing is that it will…

Lookup values from different company

public static void lookupInvoiceAsset(FormControl _formControl) { SysTableLookUp lookUp; Query q = new Query(); QueryBuildDataSource qbds= q.addDataSource(tableNum(KMCollection)); DataAreaId masterCompany; //super(_formControl,…

XML message wrapper

Want to work with XML as easy as in following examples, do not depend on XML format and have ability to change format to JSON? Read XML message: Write XML message: Select node with namespace: Base abstract class to support several message…

classname object does not have method 'new'

Error executing code in CIL: <object> object does not have method 'new' And you are using SysExtensionAppClassFactory to instantiate correct type of a class. The problem usually is in different number of parameters which are at parent and…

SysExtension class factory

Attribute class, which will be used to attribute each class in the hierarchy and instantiate the correct one. Should extend SysAttribute. construct method of the base class, which based on the enum instantiate the right class from the…

Search

About

DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics 365 FO.

Authors are allowed to set their own "buy me a coffee" link.
Join us.

Blog Tags