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)

Disable link between parent and child datasource in forms

(0) ShareShare
ReportReport
Posted on by 570

Hello,

I 've the form\bomconsistof  based on bomversion datasource

When I change one grid field of the bomversion_ds I need to show

the prodtable related to this bomversion

Then I added the following in bomversion's validatefield() method:

Args args = new Args();

args.record(mybomversion);

new MenuFunction(MenuItemDisplayStr(ProdTableEditList),MenuItemType::Display).run(Args);

and added a range in the in the prodtable based on this bomversion

and all works fine

When I lost focus on this bomversion_ds line the linkactive method of the form\prodtable is called

and the args().record contains the current focused bomversion 

There are no relations between BomVersion and prodtable at table level

My question is :

Why the prodtable form remains linked to the bomversion_ds and the linkactive method is always called? I don't need this, I just want to load the prodtable one time 

How can I "unlink" the two forms?

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Try prodtable_ds.clearDynaLinks(). It removes links put in by system. I'm not sure thought if this will help since they don't seem to be linked in the first place.

  • 5400 Profile Picture
    7,162 on at

    validateField is not  correct place to display the UI. See you are passing  args recodes from current line during changing the field value. But scope is not getting vanish due to link active code base. It is depends on caller form. if  your caller form having data source BOM, BomVersion  or BOMTbale,  BOmId is getting initialize which is getting link with prodtable automatically. Please clear the link once you open the ProdTableEditList UI to keep it remain same.

  • PIX Profile Picture
    570 on at

    how can i do that and in which form's method?

  • 5400 Profile Picture
    7,162 on at

    Please check BOMTable having relation with prodTable please put the debugger in init method as well as linkActive method and check link relation between tables and try to clear it through query API.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans