EDIT METHOD IN FORM DATA SOURCE LEVEL IN AX2012

 edit FirstName editform(boolean _set,DaxCustTable _DaxCustTable,FirstName _name)

{

    FirstName name= _name;

    //DaxCustTable _DaxCustTable;

   DaxCustTable1 _DaxCustTable1;

    if (_set)

    {

        if (name)

        {

         ttsBegin;

            select forupdate _DaxCustTable1 where _DaxCustTable1.ID==_DaxCustTable.ID;

            _DaxCustTable1.FirstName=name;

            _DaxCustTable1.update();

         ttsCommit;

        }


    }

    else

    {


    select FirstName from  _DaxCustTable1 where _DaxCustTable1.ID==_DaxCustTable.ID;


    }

    return _DaxCustTable1.FirstName;

}

No comments:

Post a Comment