Métodos básicos en Axapta

1.       Método FIND:

public static PBookTable find (PBookId _idBook, boolean _update)
{
    PBookTable  pBookTable;
    ;

    if(_idBook)
    {
        pBookTable.selectForUpdate(_update);
        select firstonly pBookTable index Idx
        where pBookTable.PBookId == _idBook;
    }
    return pBookTable;
}

2.       Método EXIST:

public static boolean exist (PBookId _idBook)
{
    return _id && PBookTable::find(_idBook).RecId != 0;
}

3.       Método DISPLAY:

display Description getDescription()
{
    PBookTable    pBookTable;
    ;
    return pBookTable::find(this.PBookId).Description;
}
Anuncios