To implement the table extension framework in Dynamics AX 2012 R3, following are the steps:
Assume that you have table SalesLine and you want to make extension table ISPLSalesLineExtension.
At SalesLineExtension table, add new relation named SalesLine, table SalesLine.
Add a new field ForeignKey -> PrimaryKey based at newly created ISPLSalesLineExtension table. Reference field to the primary table will be added automatically.
Note: if the parent table’s primary key is not RecId-based, but the table has CreateRecIdIndex property set to Yes, then the relation on step #1 should be created based on “Single field AlternateKey based”; otherwise the new field will potentially have wrong type, and it will not be possible to use it in the SysExtensionSerializerExtensionMap map.
Add parent table (SalesLine – If it is standard table it might already be exist) to SysExtensionSerializerMap and child table (ISPLSalesLineExtension) to SysExtensionSerializerExtensionMap
This field is available in standard table (Check if already exists)
Check if code already exists if it is a standard table.
public void insert()
{
super();
this.SysExtensionSerializerMap::postInsert();
}
public void update()
{
super();
this.SysExtensionSerializerMap::postUpdate();
}
public void write()
{
super();
ISPLSalesLineExtension.SysExtensionSerializerExtensionMap::insertAfterBaseTable(SalesLine);
}
Write Method of child table triggers first and as a result child record will not be saved as it’s insert and update methods does not allow it without correct foreign key.
Feel free to contact us in case of any query.
Intech Systems is a three-cloud Microsoft-certified partner that boasts deep expertise in providing digital transformation solutions for organizations by leveraging the Microsoft 365, Dynamics 365, and Azure solution stack. Intech is recognized as a top-tier Microsoft implementation partner globally and specializes in transformative technology solutions such as ERP (Enterprise Resource Planning), CRM (Customer Relationship Management), Business Process Automation, Business Intelligence, Cloud Infrastructure, Data Management, Productivity & Collaboration and Generative AI (Gen-AI) solutions. As a trusted Microsoft Solutions Partner, we are capable of doing complex technology implementations catered to an organization’s specific needs & also rapid solution implementation such as our Microsoft Dynamics 365 Business Central implementation packages. We pair our implementations with end-to-end customer support, offshore development & 3rd party integrations. With offices in India, USA (United States of America), and Singapore, we work with clients across globe to empower businesses with cutting-edge technology solutions. Our latest services aim at delivering business ready AI solutions to the customer, like our Microsoft Copilot Consulting Services & Solutions for small, medium & large enterprises. Intech’s expertise lies in building software solutions for Manufacturing, Professional Services & Healthcare. Our Dealer Management System, Sales and Service CRM for Manufacturing, Field Force Automation for Pharmaceuticals and Manufacturing Central are some of our leading industry solutions. Intech’s vision is to catalyze digital futures for operation-centric industries globally, we are at the forefront of innovation, helping organizations drive growth and innovation like never before. Contact Us to learn more.
A Day in the Life of Customer Service: Sound Familiar? Picture this: It's 9:05 AM...
As businesses grow and projects multiply, managing invoices efficiently becomes crucial. In the 2024 release wave...
Exploring Trends for AI in CRM and ERP Systems [2024] Did you know that a...