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)

Multiple datasources in one form can make changes to the parents data source and save it but not to the child

(0) ShareShare
ReportReport
Posted on by

Hi all,

I have a problem on a form with updating records in a specific data source:

For example I have table/datasource 1 which is the main datasource for my form, and table/datasource2 2 which has a delayed join.

Now if I change fields in my form that are fields in datasource1 and select the next record from datasource 2 it gets updated.

When I change fields in my form for datasource 2 it doesn't get updated when I select the next record of data source 2. 

There is a linktype method under datasource 1 a validatewrite.

Do I need to make a refresh method on data source 2 and write a ds refresh/reread method?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Denis Macchinetti Profile Picture
    16,444 on at

    Hi Thomas

    If I understood correctly, for a specific Datasouce/Table, the update method is triggered when you change record.

    So in your scenario, if you change record on the child datasource isn't triggered the update on the Parent Datasource.

    If you want that, you have to "force" adding the correct code on the Write method of the child datasource, like datasourceParent_ds.write()

  • Community Member Profile Picture
    on at

    Hi Denis

    Thanks for your quick response.

    There is a write, active and delete method in the child datasource, in the write method it specifies to do a reread and refresh of the parent data source on basis of the recid, the strange thing is the fields are updated when I use the refresh command button or leave the edit screen. Now there are some text fields in the same child data source that are updated when I select the next record arrow icon (these are fields I can't filter on in the table browser) I tried adding the refresh method to include it on recid for table 2.

  • Verified answer
    Community Member Profile Picture
    on at

    Hi All,

    I found the answer it had to do with the focus of the child table I could go to the next record if the focus was on the parent table and I changed something on the child table it would go to the next record, we made a next and previous method dat with table1_ds.next() and a table1_ds.previous() excluding the super(); (outcommenting) Thanks for your help Denis! Hope this answer helps somebody.

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