Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下面这两种说法有什么区别?
newTable = orginalTable
或者
newTable.data(originalTable)
我怀疑 .data() 方法有性能优势,因为它在标准 AX 中更常用。
试试这个:
newTable = originalTable; info(strfmt('%1 %2', newTable.recId, originalTable.recId); newTable.data(originalTable); newTable.insert(); info(strfmt('%1 %2', newTable.recId, originalTable.recId);
您会看到第一条语句只是创建了另一个指向现有记录的指针。第二个创建现有记录的新副本。