Buf2Buf() vs Data() method
Views (23005)
Hi all,
while creating a duplicate/replica of a record , generally we use table.data() method , in place of passing each field one by one. The only issue with data() method is it copies the system fields as well , and hence if we are inserting data across companies , we can not use data() method.
So what should be solution for this, AX also provides one more generic method Buf2Buf(SourceRecord,TargetRecord) , the only difference between Buf2Buf() and data() method is that Buf2Buf() does not copy system fields.
Hence for intercompany insert of data , we should use Buf2Buf() method with changeCompany() method().
thanks,
while creating a duplicate/replica of a record , generally we use table.data() method , in place of passing each field one by one. The only issue with data() method is it copies the system fields as well , and hence if we are inserting data across companies , we can not use data() method.
So what should be solution for this, AX also provides one more generic method Buf2Buf(SourceRecord,TargetRecord) , the only difference between Buf2Buf() and data() method is that Buf2Buf() does not copy system fields.
Hence for intercompany insert of data , we should use Buf2Buf() method with changeCompany() method().
thanks,
This was originally posted here.

Like
Report
*This post is locked for comments