Incorrect company selected on quotations, sales orders etc

Can someone please assist with the following issue:

2 companies setup
Customers are assigned to a company within their accounting section (Company and debtor account)
I would like this assigned company to be selected by default when creating a new quotation, sales order etc… This doesn’t seem to work by default.
Could someone please assist?
Thanks in advance

By default company set in the Global Default will be set to your transaction, If you wish to map customer and company and fetch the company based on the customer in transaction you will have to write the custom script to fetch and set the company.

Please check the add_fetch method,

Thanks for your assistance, makarand_b

I’m struggling to get this working. Company and account are stored in a table within the customer table and I’m not sure how I could fetch the company from there. I’ve tried the obvious but can’t get it to work.

Hello again. Could somebody help me further? Thanks in advance.