Auto populate fields when i select quotation

I'm fighting against this issue since a couple of weeks and I can't figure out a way to do that.

Because i am new to sugarcrm and development

I have created a custom module COF where i want to select the quotation then auto populate the fields(all fields from quotation) to COF. so how can i get the values easily from one module to another module.

1. Can we do this based on JS because i want to edit any field then i can edit before save.

2. is it possible with custom logic hook. before save the document.

Francesca Shiekh hatsVignesh V

 I really need help, as soon as possible.

Thank you