You need to sign in to do that
Don't have an account?

Copy record from a custom object to another custom object
I have a list of records from Object 1, every record has a command link named "Buy" and i want copy the record choosed in Object 2. I've tried to build this with apex code without success. I should create a Master Detail rel but I can't understand how to do that in my specific case. Can you explain how to copy records from a Object to another with the use of commandLinks?
Greetings!
Please check the sample code in the below documentation to copy the record from one object to an another.
https://developer.salesforce.com/forums/?id=9060G0000005RBRQA2
Related reference:https://developer.salesforce.com/forums/?id=906F0000000BH15IAG
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Warm Regards,
Shirisha Pathuri