web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Code to avoid Duplicate records

(0) ShareShare
ReportReport
Posted on by 10

When we create new customer in business central, at the time of new record, if Customer name and email is similar with other previous customers, then system will populate notification that record already exits.

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    133 on at

    Is this a request for code to perform this? I’d think a codeunit with event subscribers to both fields OnAfterValidate is a good start. You can then create a subsequent procedure in the codeunit that creates a notification. Follow this guide: docs.microsoft.com/.../devenv-notifications-developing

    This blog has same code relating to notifications: https://yzhums.com/4120/

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    I would be a little careful with implementing a function like this because i think it can be hard to really make it work in a good way for the users.

    What f.example with customers having branch offices where only the address is different?

    And be careful so you do not break any logic that might be used later for creating customers from other sources than manual input.

    In the standard system there is a merge function that can be used to merge customers if you for some reason got a doublet.

    pastedimage1660948481375v1.png

    In my experience it is better to create a page that can show go to from time to time that can show you potential doublets and then you can check if they actually are doublets or not.

    I know many users wish for functions like this when they are new to a system, but then after a while they really don't see a need for it any more.

    But Josh have given you a good approach if you really want to go ahead with it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,151

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,443 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,092 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans