Skip to main content

Notifications

Microsoft Dynamics AX (Archived)
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

“The record has never been selected” error after Join/Group By clause

Posted on by 38

Hi Teams,

I'm new in Ax 2009. I would like to update the field of a record in table A after joining with another table B on which I want to apply Group by on its ID.

I tried to run the following code but it throws me an error "Cannot edit a record in tableA. The record has never been selected":

where select forupdate tableA group by tabAid, Dimension[5]
join tableB group by tabBid, Dimension[5]
where tableA.tabAid == tableB.tabBid && tableB.Dimension[5] != "" && tableA.Dimension[5]
{
    if(tableA.Dimension[5] != lines.Dimension[5])
    {
        ttsbegin;
        tableA.Dimension[5] = tableB.Dimension[5];
        tableA.update()
        ttscommit;
    }
}

If I try to remove the group by clause on tableA, tableA.Dimension[5 is empty.

Please someone help me.

Thanks in advance

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,336 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans