function parameter - Record:Temporary

EugeneEugene Member Posts: 309
what happens if one passes a temporary record into a function which parameter is not temporary ?

what i mean is this:
in Report 5811 is the following call:
CalcStdCost.TestPreconditions(Item,ProdBOMVersionErrBuf,RtngVersionErrBuf);
here ProdBOMVersionErrBuf and RtngVersionErrBuf are temporary records

but in the codeunit CalcStdCost the function is defined as follows:
TestPreconditions(VAR Item : Record Item;VAR NewProdBOMVersionErrBuf : Record "Production BOM Version";VAR NewRtngVersionErrBuf : Recor
CalcItems(Item,TempItem2);

ProdBOMVersionErrBuf.RESET;
IF ProdBOMVersionErrBuf.FIND('-') THEN
  REPEAT
    NewProdBOMVersionErrBuf := ProdBOMVersionErrBuf;
    NewProdBOMVersionErrBuf.INSERT;
  UNTIL ProdBOMVersionErrBuf.NEXT = 0;

RtngVersionErrBuf.RESET;
IF RtngVersionErrBuf.FIND('-') THEN
  REPEAT
    NewRtngVersionErrBuf := RtngVersionErrBuf;
    NewRtngVersionErrBuf.INSERT;
  UNTIL RtngVersionErrBuf.NEXT = 0;

so will NewProdBOMVersionErrBuf.INSERT; and NewRtngVersionErrBuf.INSERT; will insert data to database or will they just do it in client's memory ?

Comments

Sign In or Register to comment.