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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Joined data source not updating after changing key value

(2) ShareShare
ReportReport
Posted on by 15
Hello.
 
I have table XKOMTestTable with 1 field VendAccount. This table have relation with VendTable (XKOMTestTable.VendAccount == VendTable.AccountNum).
 
On form I have inner join with VendTable and with DirPartyTable to show readonly vendor name. It works but when I change account number name is not changed until i refresh page.
 
Is it possible to update name after changing account number?
 
 
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,826 Super User 2026 Season 1 on at
    Hi,
     
    You can use a display method to show the name of vendor.
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Tomashu Profile Picture
    15 on at
    I was using display method first but I need ability to sort/filter by vendor name.
  • Suggested answer
    Waed Ayyad Profile Picture
    9,218 Super User 2026 Season 2 on at
    Hi,
     
    Can you share the properties of DirPartyTable Datasource? Also did you try to refresh datasource on the modified method of VendAccount?
    What is the Relation Link with DirPartyTable DataSource?
     
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Tomashu Profile Picture
    15 on at
    DirPartTable datasource looks like this:
     
    Using refresh/reread in modified/write doesn't help.
     
    [Form]
    public class XKOMTestTable extends FormRun
    {
        [DataSource]
        class XKOMTestTable
        {
            public void write()
            {
                super();
                
                XKOMTestTable_ds.reread();
                XKOMTestTable_ds.refresh();
                VendTable_ds.reread();
                VendTable_ds.refresh();
                DirPartyTable_ds.reread();
                DirPartyTable_ds.refresh();
                Info("write");
            }
    
            [DataField]
            class VendAccount 
            {
                public void modified()
                {
                    super();
    
                    XKOMTestTable_ds.refresh();
                    VendTable_ds.refresh();
                    DirPartyTable_ds.refresh();
                    Info("modified");
                }
    
            }
    
        }
    
        [DataSource]
        class VendTable
        {
            public void write()
            {
                
            }
    
            public boolean validateWrite()
            {
                return true;
            }
    
        }
    
        [DataSource]
        class DirPartyTable
        {
            public void write()
            {
                
            }
    
            public boolean validateWrite()
            {
                return true;
            }
    
        }
    
    }
     
    Table/form xml is here: https://pastebin.com/6CRM128T
    It was too long to include here.
  • Suggested answer
    Waed Ayyad Profile Picture
    9,218 Super User 2026 Season 2 on at
    Hi,
     
    Please try this code, but remove the code that you wrote on the write method.
     
     class VendAccount 
            {
                public void modified()
                {
                    super();
    
                    VendTable_ds.reread();
                    VendTable_ds.rereadreferencedatasource();
                    VendTable_ds.research(true);
               
                }
    
            }
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    Is it not changing even after saving the record?

    Only fetch active - keep this as default.
  • Suggested answer
    Waed Ayyad Profile Picture
    9,218 Super User 2026 Season 2 on at
    Hi,
     
    Try to change the following property to No on DirPartyTable data source.
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Tomashu Profile Picture
    15 on at
    Setting Only Fetch Active to No on both data sources don't change anything.
     
    Reread/research in VendAccount.modified don't do anything either. And I don't know why it should, it read data from database but at modified it's not changed yet.
     
    When I add 
    XKOMTestTable_ds.research(true);
    in XKOMTestTable.write it works. But it rereads while table when I know only 1 record is changed... :(
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    Can you show the table level relation properties with VendTable and the form level datasource properties?

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

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 515 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 417 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 360

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans