can we exit a do loop on pressing esc key in dynamics ax

can we exit a do loop on pressing esc key in dynamics ax if yes then how if not then how can we achive this

Try Ctrl + Break. This is a general shortcut in AX which can stop some processes that are in the middle of execution. However this not a holy grail, it won’t work always and it may even happen that this abortion call gets kinda stuck (from my experience it happens quite often) - when executing the next process (after the first one has been interrupted with Ctrl + Break), AX may keep on asking you again and again later on if you want to stop all the next processes, AX thinks as if you keep on pressing Ctrl + Break again and again although you don’t do that anymore… typically you have to reopen AX to get rid of this annoying “bug”. I wouldn’t be mentioning this side effect of Ctrl + Break if I wouldn’t have had this happening so often on totally different systems for different customers.

Esc typically won’t do anything unless it is specially programmed in code