What is the difference between the two statements below?
newTable = orginalTable
or
newTable.data(originalTable)
I suspect there is a performance benefit to the .data() method as it is more commonly used in standard AX.
What is the difference between the two statements below?
newTable = orginalTable
or
newTable.data(originalTable)
I suspect there is a performance benefit to the .data() method as it is more commonly used in standard AX.
Try this:
newTable = originalTable;
info(strfmt('%1 %2', newTable.recId, originalTable.recId);
newTable.data(originalTable);
newTable.insert();
info(strfmt('%1 %2', newTable.recId, originalTable.recId);
You'll see that the first statement just creates another one pointer to existing record. The second one creates new copy of existing record.
© 2022 - 2024 — McMap. All rights reserved.