I want to insert records from one company to another company. For that, I have created a custom table & Page to store data and I have also created an action button. After Clicking on this Button Data is separated According to their Type. [For example, if line type is order, it will go into Sales Order page & similarly quote goes into the sales quote page]
I Have 2 companies. so if the line type is order and the customer type is 'XYZ', the sales order should be inserted into the 'xyz' company's sales order page. Similarly, if the line type is Quote and the customer type is 'abc', the sales quote should be inserted into 'abc' Company's sales quote page.
The above code works as the selected record can be copied from one company to another but I want to copy all the records into another company based on certain conditions which I have included in the code, and those records should be automatically inserted into the sales header table.
Thank You