RE: query error CS0103: The name 'query' does not exist in the current context x++
Moved from Dynamics AX Forum to Dynamics 365 Finance Forum.
Apratim, please use Insert > Code (in the rich-formatting view) to paste source code. It'll prevent the extra line spacing (caused by the fact that you have each line of code in its own paragraph), it adds line numbering and so on. For example:
void main (Args _args)
{
while select * from customTable
where customTable.field1 == 0
{
// my logic
}
}
Is it complete code? If so, please compile it - it'll fail because you've never declared custTable variable. If it's not your actual code, please give us the actual code for review.
I also see an bug there - main() should be static. It again suggests that you gave us something else than what you actual run.