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,
Thanks alot
ReplyDeleteI tried using both,i got Exactly opposite things,buf2buf working as .data.
ReplyDeletei use AX 2012 R3