web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Nested data access loop found in method

(0) ShareShare
ReportReport
Posted on by 230
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.
I have the same question (0)
  • Martin Dráb Profile Picture
    236,879 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.
  • GirishS Profile Picture
    27,825 Moderator 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.
  • CU21091228-0 Profile Picture
    230 on at
    Nested data access loop found in method
    Below code i am using.
  • Martin Dráb Profile Picture
    236,879 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?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 684 Super User 2025 Season 2

#2
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 588

#3
Martin Dráb Profile Picture

Martin Dráb 542 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans