“I wanted to thank you again for all the technical assistance and development you have been doing for us.  We’ve always appreciated your support and we look forward to working with you and your excellent team (Nerijus and Denis) in the future.  The clients have mentioned how happy they are with your results and are also very appreciative.”
Gino Manocchio, Agility Business Solutions, Partner, 2009

Famous Ctrl+Z

Most of Ax people already are used to press Ctrl+Z in any field on a form and that brings full info about the field begind the control: table, field, type etc.

However, in contrary what some people may think, this is not standard Ax.

Below is the code that implement this nice feature.

Here is a method task() in system class SysSetupFormRun.

public int task(int _p1)
{
    #task
    FormDataSource formDataSource;
    int ret;
// Modification BY ERPServis (AxDevGuru) - Begin
    //Shows table and field or datamethods name when Ctrl + Z pressed on a field on a form
    DictField   df;
    FormControl fc;
    formStringControl fsc;
    DictEnum dictEnum = new DictEnum(enumnum(Types));
    DictEnum dictEnums;
    ;

    if (_p1 == 769) //Ctrl + Z
    {
        fc = this.selectedControl();
        formDataSource =  this.objectSet();

        if(fc && formDataSource)
        {
            fsc    = fc;
            if(fsc.dataField() && formDataSource.table())
            {
                info(strfmt('Table    -> %2.%1',fieldId2Name(formDataSource.table(),
                                    fsc.dataField() - 65536),
                                    tableId2Name(formDataSource.table())));
                                    df = new DictField(formDataSource.table(), fsc.dataField() - 65536);
                if(df)
                {
                    info(strfmt('Name    -> %1',df.name()));
                    info(strfmt('Type     -> %1',dictEnum.index2Symbol(df.baseType())));

                    if(df.baseType() == typeOf(Types::Enum))
                    {
                        dictEnums = new dictEnum(df.enumId());
                        info(strfmt('Enum     -> %1',dictEnums.name()));
                     }

                    info(strfmt('Ext type -> %1',extendedTypeId2name(df.typeId())));
                    info(strfmt('Size       -> %1',int2str(df.stringLen())));
                }
            }

            if(fsc.dataMethod())
            {
                info(strfmt('METHOD %1.%2',tableId2Name(formDataSource.table()),
                                           fsc.dataMethod()));
            }
        }
  }
// Modification BY ERPservis (AxDevGuru) - End

// rest of the method
;
}

Comments (1)

  • MaxGabroTen 2017-02-21 02:34

    Good employment! Thanx you concerning you job http://www.fincircoli.it/node/124 http://dev.slf.org.au/node/4797 http://sibbs.tsu.ru/node/185

Write a comment