Copy all data values to another form

I want to copy all data values to another form.

Example:- open submitted Sales Order then go to connections section click on Sales Invoice Plus button then open New Sales Invoice with copy all data values from that sales order.

That’s possible using the Action button.
From Sales Order, click on Action > Create Sales Invoice.
Data is automatically fetched based on field names.

I try but no luck.

And is it work with custom field?

Solve with override method.

@mohsininspire any chance you could share the method you used? will be appreciated.

@mohsininspire how to solve using override method and what method you have used. It will be very much useful.