31 August 2009

Intel Graphic - Rotate / Flip Screen shortcut

I just found the following shortcuts to flip or rotate the screen.

Just press
STRG + ALT + Arrow Keys:
  • UP : rotate 0° (normal position)
  • RIGHT: rotate 270°
  • DOWN: rotate 180°
  • LEFT: rotate 90°
These shortcuts should work with many of the newer Intel Graphic Chipsets when the original drivers are installed.

11 August 2009

Dynamics AX Search

Dynamics AX Suche

10 August 2009

numberSeqFormHandler

if you need to use a numberSequence in a form you can use the numberSeqFormHandler. Therefor you have to add a new method to the form an overwrite some methods of the datasource, as mentioned below. 1. Add in ClassDeclaration
NumberSeqFormHandler numberSequence; 
2. Add a new method for the numberSeqFormHandler on the form
NumberSeqFormHandler numberSeqFormHandler()
{
    if (!numberSequence)
    {
        numberSequence = numberSeqFormHandler::newForm(
            NumberSequenceReference::find(
                typeId2extendedTypeId(typeID(__EDT_NumSeqId__))).NumberSequence,
            element, __Table_DS,
            fieldNum(__Table__, __NumSeqId__));
    }
    
    return numberSequence;
}
3. Override the datasource method create() / delete() / write() / validateWrite()
public void create(boolean _append = false)
{
    super(_append);
    element.numberSeqFormHandler().formMethodDataSourceCreate();
}

public void write()
{
    ttsbegin;
    super();
    element.numberSeqFormHandler().formMethodDataSourceWrite();
    ttscommit;
}

public boolean validateWrite()
{
    boolean ret;
    ;
    ret = super();
    ret = ret && element.numberSeqFormHandler().formMethodDataSourceValidateWrite();
    return ret;
}

public void delete()
{
    ttsbegin;
    element.numberSeq().formMethodDataSourceDelete();
    super();
    ttscommit;
}

public void linkActive()
{
    element.numberSeqFormHandler().formMethodDataSourceLinkActive();
    super();
}
And remeber that continuous number sequences can only be used in transactions (between ttsbegin; and ttscommit;)

05 August 2009

AX: View the executed query - SQL Statement

Back from Holiday :) If you need to find out which query will be executed just past this this code after the super in the executeQuery Method.
super();
...
info(this.query().dataSourceNo(1).toString()); 

or 

info(this.query().dataSourceName("inventTrans").toString());