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, ...
Unanswered

Form refresh issue when adding view to form ds with inner or outer join

(1) ShareShare
ReportReport
Posted on by 959

Situation explanation

 
Form refresh issue when adding view to form ds with inner or outer join -> form loses selected record when one of it's root DS childs are linked via inner/outer join.
Created simplified cust table simple list form which have 3 DS
  • CustTable (root)
  • CustGroup (a table outer joined to CustTable and addlink in init method)
  • CustGroupFinTagSourceView (a view outer joined to CustTable and addlink in init method)
Table works without any issues, but view loses selected record when clicking form refresh

Situation from form VS perspective

GIF Demo

Short demo
1. Refresh works as expected - does not lose selected record position when joined view DS is disabled, but table DS is not
2. Joined view ds enabled breaks this
3. task workaround enabled fixes, but maybe there is more elegant way achieving this?
 
 

Task method workaround

    public int task(int _p1)
    {
        #Task
        int             ret;
        CustAccount     custAccountBeforeRefresh;
        boolean         gridLosesRecordOnRefreshWorkaroundNeeded;
    
        // workaroundForRefreshEnabled =>
        gridLosesRecordOnRefreshWorkaroundNeeded = _p1 == #taskRefresh && workaroundForRefreshEnabled;
    
        if (gridLosesRecordOnRefreshWorkaroundNeeded)
        {
            custAccountBeforeRefresh = CustTable.AccountNum;
        }
        // workaroundForRefreshEnabled <=
    
        ret = super(_p1);
    
        // workaroundForRefreshEnabled =>
        if (gridLosesRecordOnRefreshWorkaroundNeeded)
        {
            CustTable_DS.positionToRecord(CustTable::find(custAccountBeforeRefresh));
        }
        // workaroundForRefreshEnabled <=
    
        return ret;
    }
 

Question

Can I achieve similar without workaround in task method?
 
 

Whole CustTableSimple.xml source

Attached as attachment.
 
Categories:
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 616

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 460 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 331 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans