Hello,
I’d like to merge two customers, so I have to modify all tables where this customer is used, for that I tried to use RENAME function but I had a problem with some keys.
For example :
No. Bank account
Customer1 B1
Customer2 B1
Customer2 B2
I want to put Customer1 in Customer2, so I did :
Cust1.GET('Customer1 ');
Cust2.GET('Customer1 ');
Cust2.DELETE(FALSE);
Cust2.GET(‘Customer2’);
Cust2.RENAME(‘Customer1’);
Cust1.MODIFY;
There is two problems here :
1- when it tries to modify the bank account it shows an error two records with the same key !
2- It doesn’t insert B2 for the customer1
I didn’t use my own search and modify / insert because If the user add a new relation table, I have to modify the code !
Is there a methode or an idea to do this modification dynamically ?
Thank’s for your help.