List of Tables Method X++





List of Tables Method X++




public class SLD_MethodList
{
   

    public static void main(Args _args)
    {
   
        SysDictMethod   sysDictMethod;
        SysDictTable sysDictTable;
        Set dictMethod;
         sysDictTable = new SysDictTable(tableName2Id('CustTable'));
         dictMethod = sysDictTable.methods(true, true, true);

         SetEnumerator enumerator = dictMethod.getEnumerator();

        while (enumerator.moveNext())
        {
            sysDictMethod = enumerator.current();
           
            info(sysDictMethod.name());
        }

    }
}

Support Faryal's Cusine


Edit Method D365FO





Edit Method D365FO




In AX 2009, when reference control was not available, in the table if there is a relation created on the basis of any field i.e. there is a child table and it contains the record Id of the parent Table. When that child table binds to form, (to display and select the user-friendly information from the parent table, lookup controls were used). The record Id of the user-friendly value is saved on the table with the help of the edit methods.

Here is the example to use Edit Method.



edit int ageUpdate(boolean _set, int value)
    {
        SLD_DemoTable _demoTable;
        int  ret;

        // find the car records from the car table with update = true
        _demoTable = SLD_DemoTable::find(this.Name, _set);

        if (_set)
        {
            ttsbegin;

            _demoTable.Age = value;
            _demoTable.update();

            ttscommit;
        }
        else
        {
            ret = _demoTable.Age;
        }

        return ret;
    }

Support Faryal's Cusine


Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...