Code to Copy Data from one module to another module based on Look Up Field Value

Code to Copy Data from one module to another module based on Look Up Field Value

Hello all,

I know this topic has been discussed, but unfortunately I could not make it work.

I need the following - I have two modules -
Module A with Record A that has Field A1 and Field A2
Module B with Record B that has Field B1 and Field B2

In Record B we have a lookup value to Record A from Module A.
What I want is to transfer the values from Record A to Record B in the other Module
Lookup in Record B > Record A
Field A1 > Field B1
Field A2 > Field B2

I would kindly ask for a code to do that. Also if possible, which I found complex in the other posts - if you can make in bold the bits and pieces I need to change each time for each different module.

Thank you for you help and time!
Ivan