Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Nested data access loop found in method

(0) ShareShare
ReportReport
Posted on by 171
Hi Team,
 
I have created one custom View ABC_CustPackingSlipTrans.
 
If i use ABC_CustPackingSlipTrans with while select, getting below BP Warning.
 
Nested data access loop found in method in D365FO.
 
Please let me know how to solve this.
  • Martin Dráb Profile Picture
    Martin Dráb 230,962 Most Valuable Professional on at
    Nested data access loop found in method
    Instead of running a while-select loop for every SalesTable record returned by the query, you could create a single query returning all the data at once.
     
    But I wonder why you need the outer loop at all. I see that you filter the inner query by deliveryDate date too, so I assume this is covered. Are you saying that your CustPackingSlipTransView returns also records with OrderAccount values that aren't the ID of related sales orders? Or why do you need to fetch the list of customers before querying custPackingSlipTransView?
  • CU21091228-0 Profile Picture
    CU21091228-0 171 on at
    Nested data access loop found in method
    Below code i am using.
  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    Nested data access loop found in method
    Hi,
     
    Refer to this documentation for list of BP warnings and how to fix them.
    Also please show us the code you have written so we can give better suggestions.
     
    Thanks,
    Girish S.
  • Martin Dráb Profile Picture
    Martin Dráb 230,962 Most Valuable Professional on at
    Nested data access loop found in method in D365FO
    You have two options: either you somehow resolve the nested looks, such as by using joins. Or you decide that you must use your current design and you'll suppress the warning.
     
    If you you don't know whether your code can be changed and you want ask us for help, not that you'll need to show, or at least describe, your current code.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans