Insert hard-code data in table through Class.

Actually, I have one table where the following fields are :- Name(String), EmpId(int),Age(int). here i want to insert the data through class.How will i insert the the data in the table.

Please help me, I am new in the AX.(Give idea about the coding part in the class ).

Thanks.

Fill in fields and call insert():

MyTable t;

t.Name = "Joe";
t.Age = 42;

t.insert();

It’s usually a bit more complicated, though. For instance:

MyTable t;

t.initValue();

t.Name = "Joe";
t.Age = 42;

if (t.validateWrite())
{
    throw error(...);
}

t.insert();

Note that search engines will help you find documentation pages, blog posts and previous discussions on topics you’re interested in.

By the way, please always attach a tag with your version (e.g. AX 2012) when creating new threads.