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

Perfomance

(2) ShareShare
ReportReport
Posted on by 252
What is better for performance and why??

These two while loops
   while select table1       where table1.AId == _aId             && table1.OC  == OC::B             && table1.ORC  == _bId   {       LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);   }  while select table1                where table1.AId  == _aId                    && table1.OC         == OC::DR                exists join table2                    where table2.OId == table1.OId                exists join table3                    where table3.DId   == table2.DId                        && table3.BId        == _bId{   LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);}
 

OR (combining them)
 
            while select table1                where table1.AId      == _aId                            outer join RecId                     from table2                        where table2.OId == table1.OId                outer join RecId                     from table3                        where table3.DId   == table2.DId                        && (                             (                              table1.OC == OC::DR &&                              table3.BId  == _bId                             )                             ||                             (                              table1.OC == OC::B &&                              table1.ORC    == _bId                             )                           ){     LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);}
 
  • CU22120935-0 Profile Picture
    252 on at
    I will post the code again

    These two while loops
      while select table1 
        where table1.AId == _aId 
              && table1.OC == OC::B 
              && table1.OR == _bId 
    {
        LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);
    }
      
    while select table1
      where table1.AId == _aId
          && table1.OC == OC::DR 
      exists join table2 
            where table2.OId == table1.OId
      exists join table3 
            where table3.DId == table2.DId
               && table3.BId == _bId 
     {
        LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);
     }

    OR combining them
     while select table1
                    where table1.AId      == _aId            
                    outer join RecId 
                        from table2
                            where table2.OId == table1.OId
                    outer join RecId 
                        from table3
                            where table3.DId   == table2.DId
                            && (
                                 (
                                  tabl2.ORC == ORC::DR &&
                                  table3.BId          == _bId
                                 )
                                 ||
                                 (
                                  table1.ORC == ORC::B &&
                                  table1.OR     == _bId
                                 )
                               )
    {
        LanguageTxt::createOrUpdate(table1.TableId, table1.RecId, _description, _languageId);
    }
     
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,826 Super User 2026 Season 1 on at

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

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 219

#3
Subra Profile Picture

Subra 211 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans