24 Jun 2015

How and use close method in a form + AX 2012

Called when a form is closed.

 when closing a form according to records in a grid of a table we update records in another table.

public void close()
{
    ThyProjForcasTable          ProjForcasTable;
    ;
    super();
    ttsbegin;
    while select ProjForcasTable
        where ProjForcasTable.ProjId == ThyProjForcasTable.ProjId
    {
        if (ProjForcasTable.NoYesId == NoYes::No)
        {
            select forupdate projTable
                where projTable.ProjId == ThyProjForcasTable.ProjId;
        Projtable.Status = ProjStatus::Created;
        Projtable.update();
        }
    }
    ttscommit;
}

No comments:

Create number sequence in D365 FO

Create the data type. Add code in the loadModule method of the appropriate NumberSeqModule subclass. Add a method to the module’s paramet...