Options

Find Duplication in Customer Master

nav_126nav_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

Answers

  • Options
    David_CoxDavid_Cox Member Posts: 509
    edited 2009-06-25
    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 :D
    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.com
  • Options
    BeliasBelias Member Posts: 2,998
    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) :wink:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Options
    garakgarak Member Posts: 3,263
    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 ....

    REgards
    Do you make it right, it works too!
  • Options
    nav_126nav_126 Member Posts: 77
    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 Developer
  • Options
    garakgarak Member Posts: 3,263
    Please no problem and welcome
    Do you make it right, it works too!
Sign In or Register to comment.