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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Production Control Base DP report AX 2012 R3

(0) ShareShare
ReportReport
Posted on by 61
////
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

I'm working on a conditional logic issue in my X++ code. I need to filter records from the ProdTable where the Production ItemId is 'Item-003366,' and this specific item number has many consumption records in its lines.

In the first line of consumption, I have an ItemNumber set to 'Item-001674.' What I want to do is further explode this 'Item-001674' to display its lines, and I need to find the first occurrence of 'Item-003366' in the report.

I'm encountering an issue in my code where I'm checking if _itemId is equal to 'Item-001674.' When it is, I call the ExplodFormulaItemConsumption method. However, when _itemId is 'Item-001674,' it seems that the code within the ExplodFormulaItemConsumption method runs indefinitely, and it doesn't return to the outer loop. I'm not receiving any error messages, but the code isn't behaving as expected when _itemId is 'Item-001674.'

I have the same question (0)
  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at
    Please use the debugger to find out more about what's happening in explodFormulaItemConsumption().
     
    Note that you may be able to simplify testing by calling explodFormulaItemConsumption() from a runnable class, rather than through the report and insertData() method, because your description suggests that they aren't related to the current problem. You just need to call explodFormulaItemConsumption() with the right parameters (such as _itemId = 'Item-001674').

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar 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... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans