web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Form Design Question

(0) ShareShare
ReportReport
Posted on by 201

When using Edit in Grid on the Released Products form, if I launch the BOM Version form, each time I change to a new Released Product, the BomVersion form will update to show the bom information of the new record.  What controls this functionality?  I would like to duplicate it on the ProdTable and ProdBom forms.  Currently, when I launch the ProdBom from from Edit In Grid of the ProdTable form, the first bom displays, but the form is blank for all other records.

Thanks!

LJ

AX2012 R3 CU10

*This post is locked for comments

  • Suggested answer
    Brandon Wiese Profile Picture
    17,790 on at

    This feature of AX is called dyna-linking, and for the most part it works automatically.

    There are a few ways to help it work.

    You can establish a relationship between the tables in the AOT, under the Relations node of either the parent or child form, referring to the other.

    Or, you can establish the dyna-link manually, usually in the form init() method or the data source init() method.  In this case you use the SysDictLink class and add dyna-links to the data source dynalinks directly, typically referring back to the caller record recovered from element.args().record().

    Finally, you can add some code to the data source .linkActive() method, which fires anytime the caller record is changed, and then you can take field values from the caller record, again recovered from element.args().record() and modify the query as needed, calling .executeQuery() when finished to refresh the child form.

    There are many, many examples of all of these in the AOT.

  • lispyj Profile Picture
    201 on at

    This one seems like a linkActive() thing.  Without any customization, when I make a new selection in the ProdTable form (original form), the Title Bar of the ProdBom form changes, so there is some kind of link there.  I have tried adding some code to the link active method of the ProdBom datasource on the ProdBom form:

    if(ProdTable)

    {

    currentActiveProdBom = ProdBOM::findTransId(ProdTable.InventTransId);

    prodBom_ds.findRecord(currentActiveProdBom);

    }

    It didn't work, but it also doesn't seem necessary....the form already knows the new production order number.  I did try some AddDynalink() attempts, but they didn't work.

    I am still puzzled....

  • Community Member Profile Picture
    on at

    i had a similar problem, recently, and Brandon Wiese put me in the correct direction for the solution. Dynalinks were the issue, and it turns out that thay sum up (in an AND statement) with other statements in the resulting sql query. What you should try is clearing the already active dynalinks within you queryBuildDataSource and then add the one you need.

    try reading this: 
    https://community.dynamics.com/ax/b/dynamicsaxinsightbyanas/archive/2014/07/22/ax-2012-add-dynalink-in-x

    h
    ope this was helpful.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Prashant Singh Profile Picture

Prashant Singh 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans