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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Form Design Question

(0) ShareShare
ReportReport
Posted on by 181

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

I have the same question (0)
  • Suggested answer
    Brandon Wiese Profile Picture
    17,788 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
    181 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans