April 01, 2013

Get Current Company in AX

Get Current Company in AX

Below is the example on how to get current company in AX 2009.
In AOT > Jobs, paste the following code:

static void curExtExample(Args _arg)
    str curCompany;
    // Sets curCompany to the extension of the current company.
    curCompany= curExt();
    print "Current extension is " + curCompany;

You can use this code in your forms and reports also to parameterized your reports/Forms.


1 comment:


Note: Only a member of this blog may post a comment.