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
0
Answers
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
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
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)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
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 ....
REgards
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 Developer