setTmp() : has nothing to do with deletion at all. It turns a buffer to a temporary one, therefore it saves records to memory/on disk instead of into database. If you delete everything from the temporary buffer, it doesn't delete anything in database, obviously. So any data manipulations will be lost once the execution of this … Continue reading AX – D365FO – How to use Normal Table as Temp Table?