After many hours of investigating I cannot solve this issue.
We have set up custom fields in the Accounts moidule. All works fine.

However when a lead is converted to an account, we can not then edit the newly created account. It seems to be an issue where the accounts_cstm record is not set up properly. When I run an update query manually on the new accounts_cstm record, it seems to fix the problem and we can then update the account.

How can we get around the need to manually run an update query on the accounts_cstm record? Alternatively can someone supply some code to insert in the PHP files that will fix the accounts_cstm record?

here is an example of the query that fixes the problem:

update accounts_cstm inner join accounts
on id = id_c
set cust_acc2_c = name, commence_date_c = date_entered,
billing_addressee_c = '', Billing_currency_c = '0', nationality_c = '',
cpr_c = '', credit_limit_c = 0, cps_flag_c = 0, cust_category_c = 'MDU'
where id_c = '15700e83-e872-eb85-e577-45444a4974e1'

thanks
Harold