web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / AX Dev Help / Buf2Buf() vs Data() method

Buf2Buf() vs Data() method

Gaurav Pandey Profile Picture Gaurav Pandey 960
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,

This was originally posted here.

Comments

*This post is locked for comments