Wednesday 3 December 2014

Table inheritance in Ax 2012


Step-1 Create a table called 'BaseTable'
Step-2 Set table property 'supportInheritance' to 'Yes'
Step-3 Create a filed name called 'InstanceRelationType' extends 'RelationType'
Step-4 Set table property 'InstanceRelationType' to 'InstanceRelationType'
Step-5 Create two filed called Id and Name as shown below screen
Step-6 Create another table called 'ChildTable'
Step-7 Set table property 'supportInheritance' to 'Yes'
Step-8 Set table property 'Extends' to 'BaseTable'
Step-9 Write a job to access the base table fields given below

static void dataInsert_BaseTable(Args _args)
{
BaseTable bt;
ChildTable ct;

ct.Id = '1000';
ct.Name = 'Test';
ct.insert();
}

No comments:

Post a Comment