Morten Lehrmann's Dynamics AX Blog

Morten Lehrmann's Dynamics AX Blog

About the Blog

The Blog gathers issues I have found useful during my work with Dynamics AX

How to use insert_recordset to insert from several tables

TipsPosted by Morten Lehrmann 2009-04-07 16:39:16
insert_recordset T1 (A, B)
select A from T2
where T2....
join B from T3
where T3...

Browse web page

TipsPosted by Morten Lehrmann 2009-04-07 16:37:37
To open a browser on a web page from Dynamics AX, use:
infolog.urlLookup("http://lehr.dk");
or
winApi::shellExecute("http://lehr.dk");

Pass container in Args

TipsPosted by Morten Lehrmann 2009-04-07 16:33:49
To pass a container to an object in Args you need to encapsulate the container in an object, e.g.:

Container c = [1,2,3];
ContainerClass cc = new ContainerClass(c);
;
_args = new Args();
_args.parmObject(cc);
theClassToCall::main(_args);
And in the receiving class: static void main(Args _args)
{
ContainerClass cc;
Container c;
;
cc = _args.parmObject();
c = cc.value();
}

How to obtain the name of the computer on which this code executes:

TipsPosted by Morten Lehrmann 2009-04-07 16:29:07
info(WinAPI::getComputerName());

« Previous