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.'