Find Duplication in Customer Master
nav_126
Member Posts: 77
Hi All,
For one of our client who has 50000 customers in Navision Database. Now the client wants to compare the Customer Name, Address to find out a duplication in system.
I do not want to compare whole Name field with other Name field. I have to break the name field and then compare with other name field. Same process for address also.
Can anyone suggest a way to do? i found it tidious and bit difficult process.
](*,)
Thanks
Navision Developer
For one of our client who has 50000 customers in Navision Database. Now the client wants to compare the Customer Name, Address to find out a duplication in system.
I do not want to compare whole Name field with other Name field. I have to break the name field and then compare with other name field. Same process for address also.
Can anyone suggest a way to do? i found it tidious and bit difficult process.
](*,)
Thanks
Navision Developer
0
Answers
-
A Customer could have several branches with the same name, so you will need to compare a couple of fields Name and (Zip) Post Code are the most likely choices these need to be well formed and same case to find duplicates.
Quick Solution:
Create a buffer table with fields 'No.' Code 20, 'Name' Text 50,'Search Name' Code 50, 'Post Code' Code 20, 'Matches' Integer
Primary Key = 'No.'
Secondary Key = 'Search Name', 'Post Code'
The field Matches is a flowfield with Count of Buffer Table where 'Search Name' = 'Search Name' and 'Post Code' = 'Post Code'
Create a report on the Customer table to populate the buffer table and a global record variable for the buffer table.
Empty the buffer table if running more than once.
Customer data Item OnAfterGetRecord
BufferTable.INIT;
BufferTable."No." := "No.";
BufferTable.Name := Name;
//Strip out all spaces and other chars that could mess up the compare
//J & V v.o.s. Search Name becomes JVVOS for matching
BufferTable."Search Name" := UPPERCASE(DELCHR(Name,'=',' +"&/,.;:-_(){}#!£$\'));
//CZ-696 42 Post Code becomes CZ69642 for matching
BufferTable."Post Code" := UPPERCASE(DELCHR("Post Code",'=',' +"&/,.;:-_(){}#!£$\'));
BufferTable.INSERT;
Now you can create a form or report and filter on Matches <> 1
This simple code segment is based on the the Contact Management codeunit 5060 DuplicateManagement, so if all Customers are Contacts then you already have the tools to find duplicate Contacts.
David
Analyst Developer with over 17 years Navision, Contract Status - Busy
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com0 -
never used, i only know that exists:
sales & marketing>marketing>periodic activities>duplicates...
It's a standard functionality, for contacts: maybe it can help you (you'll find "F1" help as it's standard)
0 -
check the MArketing Module. There is a Duplicate Function for Contacts.
It's descri. in the Onleine Help how to setup and it'S also descr. in the Marketing PDF.
But this Duplicate function is only for Contacts and not directly for customers.
Also it's not the fastes ;-). As i sai, check these Grandule before ....
REgardsDo you make it right, it works too!0 -
Hi All,
Thnx a lot for your help. I didnt know the in built functionlity. This works fine for me and can customize it for my requirement.
Thnx again
=D>
Regards
Navision Developer0 -
Please no problem and welcomeDo you make it right, it works too!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 323 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions