Transfer field between tables

hello guys,I am new in ax.I dont know how to transfer a field from one table to another ,and also in form too.I should add to table and also form too.

It should be something about init method but I do not have any exampe about it.And search it on internet but I confused more.

Could you guys help me?

Send me a example or can you give me a direaction?

Please elaborate what exactly you’re trying to achieve. Why do you want to copy something instead of referring to it, when should the copy happen and so on. Also, please explain which parts you already know (e.g. it would be a waste of time to explain how to add a new field if you already know it) and which ones you’re struggling with.

i do not know how to add to in to code actually,after drop into the field to table what should i do after on code to use init method or initvalue for this adding.

As Martin said, please elaborate what exactly you’re trying to achieve. Your concern is to transfer field between tables and you stated that you simply drop into the field to table. That’s it, simply drop or drag, there is no need for you to write code on it.

i have to need the data from the other table too,not just drop .I have to drop the fields but i need them their datas from another table too,so i should wrote sometihng like initfrom…table. and wrote in to the table right?

You can write initFromTable method on the table. You should also know when you are going to call it.
When or by doing what you want the data to be transferred?

i need to data transfer also,can you send me example of initfrom .
I have to wrtie this method which table? for example a is my main table and i need to transfer fields from a to b.
so i have to write the init from method whic table? and also after initfrom Should i do something more on table or form?

You have to write it on B and say initFromA.
There are lot of examples in AX. Example - \Data Dictionary\Tables\CustTable\Methods\initFromCustGroup

It depends on how and when you are calling that method?

Forget all code for a moment and think about what you want your logic to do. What event will trigger the copy? How will you identify the record to take data from, and how the one to write into? Or will you create a new record?

Hi smoch9339,

Hi for me, it’s easy to transfer data(s) of table use of “Jobs” on AOT environment. You can create a query in there that can copy data A to B and also you can filter any you want record(s).

Jobs are not reusable and you cannot use them in building any requirement or functionality.

Hi Kranthi,

Thanks to heard about your concern on functionality. But just like what I said “for me”, I am not saying use “Jobs” to make transfer of records into other table.

Thank you for your replies,I solved the problem by put the right code in the table’s init’s method.I just use initfromcaller method’s and add my field in to them.