Delete all in codeunits

Hi experts,

I am new bee to navision and learning navision coding.I checked code unit 80 to understand coding.

In that codeunit i found Delete all function many times.

like DocDim.DELETEALL;

TempJnlLineDim.DELETEALL;

SalesLine.DELETEALL;

SalesCommentLine.DELETEALL;

StrOrderDetails.DELETEALL;

Like these i found many times. I could not understand this.
It will be very grateful if any body can give the wonderful example to unerstand this lies.

thanks in advance

Don’t panic, these are all related to temporary tables. Temporary tables are stored in RAM, so this does not affect the data stroed on your server.

But “do not try this at home” unless you are absolutely sure you know what you are doing! Calling DELETEALL may damage your system in a very permanent way. And doing this without the TRUE-parm is an unconditional command.

Yes I should have pointed that out of course [;)]

Thank U David,

I never panic about this code. Beacuse i have great navision developer David singleton.If it is anything going wrong

in navision ,my great developer David singleton can control that one. that’s ok

I want some detail explanation on that line how it is processing. i know what is purpose of that function Deleteall.

But how this function working in this codeunit. Could u take any one line that is SalesLine.DELETEALL;. and explain that process

understand u r student problem.Master u should help on this with wonderful explanation.

thanks and regards

Basically the Temp table is created in RAM on the local computer. You have to delete any records that may have been there from the last run of the function. Now you go through the records you need to use, and you insert them into the Temp Table. Now you can work on the local temp versino with out having to access the database. This is much faster.

It also give the advantage that you can change values in the records set without affecting the real data.