OLAP Cube Manual deployment and Error resolution with limited licenses and Config keys [Dynamics AX]

Friends, recently I was involved in OLAP Manual Cube deployment for a client with limited license keys and config keys

OLAP Cube Manual deployment and Error resolution with limited licenses and Config keys. I have created a document which details about the error messages and resolutions while manual deployment.
OLAP Manual deployment_Error Resolution

Functionality in Microsoft Dynamics AX can be turned on or off depending on license and configuration keys. A license key controls the modules that are available to you. For example, if you have the Additional Modules license, you can use the Human Resources I and Human Resources II modules. License keys must be purchased.

A configuration key controls the functionality that is available to you within a module. For example, if you have the Recruiting (HRMMangementRecruting) configuration key, you can use the recruiting forms and functionality in the Human Resources II module.

The default OLAP cubes that are provided with Microsoft Dynamics AX require full license and configuration keys. When you turn off license or configuration keys, or when some keys are missing, data and functionality in Microsoft Dynamics AX is removed.

As a result: Cubes cannot be processed (because they cannot access the data they were designed to retrieve. This document will help to resolve new errors which are not listed in the ConfigureDefaultCubes.pdf given by Microsoft.

We can use The Default Cube Advisor Tool for Microsoft Dynamics AX 2009 that generates a list of Cube and Role Center elements that are not valid for the specific license and configuration keys you are using.

Facility Management in Dynamics AX 2009

Friends,
Facility Management will help the users enter and track facility management requests. The Facility Management sample application works with Microsoft Dynamics AX 2009.

The Facility Management sample application for Microsoft Dynamics AX 2009 provides an example of how to implement common functionality in Microsoft Dynamics AX. Use it to learn about how to implement your own module or integrating application.

For more details and to download the developer sample, XPO , test data : visit : http://archive.msdn.microsoft.com/FCMDynamicsAX2009
Thanks!!

Splitters in Dynamics AX [X++, SysFormSplitter_Y, SysFormSplitter_YBottomBound]

Friends, today we will learn how to add splitters to the form.
There are 3 types of splitters : X -axis, Y-axis and Y-axis BottomBound
Classes which help for adding splitters are listed below.

  • SysFormSplitter_X
  • SysFormSplitter_Y
  • SysFormSplitter_YBottomBound
  • Splitter is actually a group control but by setting up some properties on the group control will make it look like a thin line as a seperator.

    Let us learn all these splitters one by one with an example.. Follow me to learn splitters..

    Y_Axis splitter:
    Create a new form with name SR_YAxisSplitter and add 3 new controls to it.
    Add a stringEdit control “Name” and set the autodeclaration property as “Yes”
    Add a group control “GroupSplitter” and set the proeprties as shown in the image below.

    Add another string edit control “Organization” .
    Now, your form should like the screen shot below

    Modify the classdeclaration method of the form by creating an object of SysFormSplitter_Y as shown below

    public class FormRun extends ObjectRun
    {
    SysFormSplitter_Y _formSplitter;
    }

    Override the init() method of the form and instantiate the SysFormSplitter_Y class as shown below.

    void init()
    {
    super();

    _formSplitter = new SysFormSplitter_Y(groupSplitter,Name,element);
    }

    Override 3 methods mouseup(), mousedown() and mousemove() methods as shown below


    ______________________________________________________________________
    int mouseUp(int x, int y, int button, boolean ctrl, boolean shift)
    {
    int ret;

    ret = super(x, y, button, ctrl, shift);

    Return _formSplitter.mouseUp(x, y, button, ctrl, shift);
    }
    _______________________________________________________________________
    int mouseMove(int x, int y, int button, boolean ctrl, boolean shift)
    {
    int ret;

    ret = super(x, y, button, ctrl, shift);

    Return _formSplitter.mouseMove(x,y,button,ctrl,shift);
    }
    _______________________________________________________________________
    int mouseDown(int x, int y, int button, boolean ctrl, boolean shift)
    {
    int ret;

    ret = super(x, y, button, ctrl, shift);

    Return _formSplitter.mouseDown(x, y, button, ctrl, shift);
    }
    _______________________________________________________________________

    There you go.. We are done with the development. Now let’s see how your form look like with your newly created splitter. Below is the screen shot.

    X_Axis splitter:
    Let us learn now how to create X -Axis splitters on the form
    Create a new form by name SR_XAxisSplitter as shown below.
    Add first group control and set the following properties as shown below
    Height : ColumnHeight
    Widht : ColumnWidth
    Columns: 3
    FrameType : None
    Below is the screen shot for your reference : Columns property – set to 3

    Inside the group add 3 controls
    1) StringEdit control “Name” [Autodeclaration property – Yes]
    2)GroupSpliiter Control
    3)ListView control with properties [Height – ColumnHeight and width as ColumnWidth]

    Set the following properties on the GroupSplitter control

    Next, paste the following code in the classdeclaration method

    public class FormRun extends ObjectRun
    {
    SysFormSplitter_X _formSplitter;
    }

    Override the init() method and add the below code

    void init()
    {
    super();

    _formSplitter = new SysFormSplitter_X(groupSplitter,Name);
    }

    Override mouseup, mousemove and mousedown method on the groupsplitter control and add the below code

    ______________________________________________________________________

    int mouseUp(int x, int y, int button, boolean ctrl, boolean shift)
    {
    int ret;

    ret = super(x, y, button, ctrl, shift);

    Return _formSplitter.mouseUp(x, y, button, ctrl, shift);
    }
    ______________________________________________________________________
    int mouseMove(int x, int y, int button, boolean ctrl, boolean shift)
    {
    int ret;

    ret = super(x, y, button, ctrl, shift);

    Return _formSplitter.mouseMove(x,y,button,ctrl,shift);
    }
    ______________________________________________________________________
    int mouseDown(int x, int y, int button, boolean ctrl, boolean shift)
    {
    int ret;

    ret = super(x, y, button, ctrl, shift);

    Return _formSplitter.mouseDown(x, y, button, ctrl, shift);
    }
    ______________________________________________________________________

    That’s it..we are done with X-Axis splitter as well. Now let’s see how the form looks like. Below is the screen shot

    Y_Axis BottomBound:
    Y-Axis button bound will be used in ListPages forms as a splitter between the grids and any other controls
    Below the screenshot – of newly created ListPage. Follow the properties and addition of controls as shown below.

    Next, paste the below code in class declaration method

    public class FormRun extends ObjectRun
    {
    SysFormSplitter_YBottomBound splitter;
    }

    Override the init() method and paste the following code

    public void init()
    {
    #define.startupHeight(175);

    super();
    splitter = new SysFormSplitter_YBottomBound(grid, ctrlSplitVertical, previewPane, this, #startupHeight);

    }
    Override the mouseup, mousemove, mousedown methods on the groupsplitter control and paste the below code

    int mouseUp(int x, int y, int button, boolean ctrl, boolean shift)
    {
    int ret;
    ;

    super(x, y, button, ctrl, shift);

    ret = splitter.mouseUp(x, y, button, ctrl, shift);

    return ret;
    }
    ______________________________________________________________________
    int mouseMove(int x, int y, int button, boolean ctrl, boolean shift)
    {
    int ret;
    ;

    super(x, y, button, ctrl, shift);

    ret = splitter.mouseMove(x, y, button, ctrl, shift);

    return ret;
    }
    _____________________________________________________________________
    int mouseDown(int x, int y, int button, boolean ctrl, boolean shift)
    {
    int ret;
    ;

    super(x, y, button, ctrl, shift);

    ret = splitter.mouseDown(x, y, button, ctrl, shift);

    return ret;
    }
    ______________________________________________________________________

    That’s it pals..we are done with the splitter on the list pages. Below is how your listpage look now.

    Number sequences on the form [NumberSeqFormHandler] in Dynamics AX [X++]

    Adding or Changing Unique Indexes [Dynamics AX ]

    Well, I thought this information would be helpful to all of us during pre-synchronization upgrade job.

    If you add a new unique index to a table, or change an existing one, it will cause problems for users when they upgrade to a new version of Microsoft Dynamics AX. This will cause a best practice error.
    This error can be fixed by implementing an upgrade script called AllowDupTablenameIndexname, or DeleteDupTablenameIndexname as a pre-synchronization upgrade job.

    For example, if the new unique index on MyTable is called NewUniqueIndex, the script should be called AllowDupMyTableNewUniqueIndex or DeleteDupMyTableNewUniqueIndex.
    “AllowDup” scripts
    Use this to temporarily disable the unique index. When you have removed conflicting fields, you need to run an upgrade script to re-enable the unique index.
    “AllowDup” scripts should contain the following code.

    {
    DictIndex dictIndex = new DictIndex(
    tablenum(TableName),
    indexnum(TableName, IndexName));
    ;
    ReleaseUpdateDB::indexAllowDup(dictIndex);
    }

    “DeleteDup” scriptsUse this to delete all conflicting fields.

    “DeleteDup” scripts should contain the following code.

    {
    ;
    ReleaseUpdateDB::deleteDuplicatesUsingIds(
    tablenum(TableName),
    fieldnum(TableName, UniqueIndexField));
    }

    Printing from Forms – Dynamics AX [X++]

    Friends, Hope you all had a great weekend!!

    we all know that printing is available from all forms with a data source through the Auto Report.
    If a special report has been created to support general printing from the form, implement it on the form’s user interface.

    To do this we need to Override the standard print method on the form. The report prints when the Print icon is activated. Please note: An explicit Print button should not be added to the form.
    If (in rare cases) a Print button is needed, implement it by using a Print CommandButton control.
    Implement the call to the report by using its menu item (depending on the functionality needed) as shown in the following example.

    void print()
    {
    ;
    new MenuFunction(menuitemoutputstr(Cust),MenuItemType::Output).run();
    }

    Reports with more specialized functionality should be added to the form by using menu item buttons.

    Happy DAX’ing…
    Sree

    Get SID [Security ID] of windows user using X++ [Dynamics AX]

    Friends, I was just wondering if there is any way to get the security Id [SID] of windows users. Sometimes knowing SID of system is very much helpful specially when the user in the database has been deleted or database is migrated/upgraded incorrectly. Ofcourse, we can get the SID’s easily from the system by opening registry editor and selecting HKEY_USERS in left pane to expand it, in left pane itself you will find the SID of users.But, below is the simple code to get the SID’s of windows users using X++ Code.

    Note: xAxaptaUserManager class – getuserId() also helps to get SID.

    static void SR_GetUserSID(Args _args)
    {
    str windowsUser = ‘companyDomain\\sreenath.reddy’; // DomainName\\userId
    #Aif
    #File
    networkALias alias;
    networkDomain domain;

    int pos, len;
    sid userSid;
    Microsoft.Dynamics.IntegrationFramework.Util util;
    ;
    //Split the windowsUser into domain and alias
    len = strlen(windowsUser);
    pos = strfind(windowsUser, #FilePathDelimiter, 1,len);
    domain = substr(windowsUser, 1, pos-1);
    alias = substr(windowsUser, pos+1, len – pos);

    new InteropPermission(InteropKind::ClrInterop).assert();
    // BP Deviation Documented
    util = new Microsoft.Dynamics.IntegrationFramework.Util();

    //Get the Windows SID for this user
    // BP Deviation Documented
    userSid = util.GetUserSid(domain, alias);
    CodeAccessPermission::revertAssert();

    info(userSid);
    }