Renumbering customers

Are there any other way(preferably faster) to renumber a customer than the usual way? I have made a batchjob that makes a RENAME for each customer. The batchjob will take about ten whole days before its complete. We have approx 6000 customers in our register. Best regards Daniel

Why do you want to rename them? Best Regards Mads Morre DK

We have two different customer categories: One for private consumers(shop via www) and one for our members(shop via direct). We have a lot of manual handling for our members and need to have a easy customer number. So our private customers are renumbered to have an A before their number and our members to have a number without any letters. This just to make it easy for our users to handle manually orders. /Daniel

quote:


Originally posted by danielekwall: Are there any other way(preferably faster) to renumber a customer than the usual way? I have made a batchjob that makes a RENAME for each customer. The batchjob will take about ten whole days before its complete. We have approx 6000 customers in our register. Best regards Daniel


When you rename a record, Navison looks for all fields in other tables, which have tableraletion to this table/field. Problem is, that when Navison search for those records, it use primary key, so for instance in Costumer entry leger it must for each renamed costumer, search entire table. And it uses “Entry No.” as CURRENTKEY,… So now you know, why would it take 10 days,… Solution? Create new table with old end new costumer no. Use NDT to check, where costumer no is used in table relation. Then for each of those tables/fields go throu the temp table and for each value use table.SETCURRENTKEY(field); table.SETRANGE(field,“old no.”) table.MODIFYALL(field,“new no”, FALSE) It is dirty way, but is much faster,… Regads Bostjan

Navision does NOT use the primary key. It uses the first key (if any) that includes the field. But unfortunately it does not check where in the key the field is used, and if there might be a better one. Instead of creating a report you should check which table it is searching and then create new key (or change the order). After this rename will go a lot faster.

quote:


Originally posted by Lennart Nielsen: Navision does NOT use the primary key. It uses the first key (if any) that includes the field. But unfortunately it does not check where in the key the field is used, and if there might be a better one. Instead of creating a report you should check which table it is searching and then create new key (or change the order). After this rename will go a lot faster.


Hi! Thank you for this info. It will save me a lto of work next time,… regards Bostjan

Daniel: Maybe you could use a new number instead of renaming the original. You could use the “Search Expression” (Suchbegriff?), this field is an “Alternative Search Field” for the “No.”-Field (and there’s a key on it!). e.g. “No.” = 12345 “Search Expression” = A12345 Or just create a new field and maybe an additional key!? Regards, Jörg Joerg A. Stryk Apollo-Optik, IT/ERP

quote:


Originally posted by Lennart Nielsen: Navision does NOT use the primary key. It uses the first key (if any) that includes the field. But unfortunately it does not check where in the key the field is used, and if there might be a better one. Instead of creating a report you should check which table it is searching and then create new key (or change the order). After this rename will go a lot faster.


This was a very good solution. Instead of approx 10 days it took about 1,5 hour instead. Many thanks! Daniel

quote:


We have two different customer categories: One for private consumers(shop via www) and one for our members(shop via direct). We have a lot of manual handling for our members and need to have a easy customer number. So our private customers are renumbered to have an A before their number and our members to have a number without any letters. This just to make it easy for our users to handle manually orders. /Daniel


For many reasons (renumbering hassles is one) it’s never a good idea to apply any sort of businesslogic to the Customer No. (or Item No., Vendor No. etc.). I strongly urge you to consider creating additional fields to hold the information in stead.

quote:


Originally posted by Steffen Voel
For many reasons (renumbering hassles is one) it’s never a good idea to apply any sort of businesslogic to the Customer No. (or Item No., Vendor No. etc.). I strongly urge you to consider creating additional fields to hold the information in stead.


I agree with this one. Is it not possible to use one of the standard fields? E.g. one of the posting groups? To put logic into the accountno belongs to ancient times[xx(].

Also if you are doing a large one off renumber, if possible, you can turn OFF Commitcache on the server whilst doing the rename, this will make the rename substantially faster.