https://www.d365snippets.com/2023/11/xpp-while-select-statement-in-dynamics-365-fo.html