[Last Call] Learn how to a build a cloud-first strategyRegister Now


Master/Detail in Axapta

Posted on 2011-04-28
Medium Priority
Last Modified: 2012-05-11
I want to create master detail form to display and manipulate monthly sales target.

The master table contains two columns of EnumType (Year, Month)

The details table contains (Year, Month, Warehouse, SalesTarget)

How to link the two tables with using the two fields (year, month) so that salecting year and month from master filter the details and insert (year, month) with new details records i.e, user will enter only (warehouse, SalesTarget)

By the way I could insert year and month in details table by overwriting the create method of detailed datasource

public void create(boolean _append = false)
    RepresentativeTargetLine.Year = RepresentativeTargetTable.Year;
    RepresentativeTargetLine.Month = RepresentativeTargetTable.Month;


But I have troubles with filtering and master records scrolling.
Question by:smetechit
1 Comment

Accepted Solution

JermTheWorm earned 2000 total points
ID: 35482892
I'm not entirely sure why you need the master table with year and month in them as it seems superfluous to me, you only need the targets table and the form containing the unbound year and month fields.

See Attached Project although in my case I useded the Dimension (Branch) rather than the InventLocation (Warehouse), but I trust you can work your way around that.

Essentially Apart form adding the controls to the form what has been changed is in the class declaration of the form and it's 'init' as well as the 'modified' methods on the year and month controls and most importantly the executeQuery of the sales target datasource.

I also left the Year and Month columns in the grid so you can see without adding any code it defaults to the filtered values.

P.S. You might want to rename the file with an XPO extension instead of XML before importing the project.

HTH SharedProject-SalesTarget.xml

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
Desired Skill Set for Microsoft Dynamics CRM Technical Resources – Part I
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question