Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Disable Contact creation from Customer Card

Posted on by 5

Hi,

Is there any possibilities to prevent contact creation while creating a Customer Card?

In our scenario we maintain contact cards for opportunities and CRM related work and Customer Card for financial purpose. We create Leads as opportunities from contact cards and confirmed orders as Sales Orders from Customer Card. So we need to avoid these duplication when creating the Customer Card.

Categories:
  • cliffdani16 Profile Picture
    cliffdani16 5 on at
    RE: Disable Contact creation from Customer Card

    Thanks yzhums andy4029 as you suggested this can be done in Marketing Setup and i was looking for functional solution as well. Tested it on the env.
    Mar-se.jpeg

    Shathika Karunaratne  customization also works for this
    Dev.jpeg

    Thank you for the support everyone!!!

  • Verified answer
    RE: Disable Contact creation from Customer Card

    Hi,

    yes, it is possible. the event for creating a contact while creating a customer is as below (Point 1),

    pastedimage1663660036043v2.png

    In order to skip that event (Point 2), you can create an event subscriber as below,

     [EventSubscriber(ObjectType::Codeunit, 5056, 'OnBeforeInsertNewContact', '', true, true)]
        local procedure OnBeforeInsertNewContactCustomer(var Customer: Record Customer; LocalCall: Boolean; var IsHandled: Boolean)
        begin
            IsHandled := true;
        end;

  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 73,565 Super User 2024 Season 2 on at
    RE: Disable Contact creation from Customer Card

    Hi, I also tested it before, hope the following helps.

    Automatically create contacts when creating customers/vendors/bank accounts:

    https://yzhums.com/21949/

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Disable Contact creation from Customer Card

    Nintin and Andy4209 are right here.

    No need to customize this functionality. It is controlled by setup.

  • Verified answer
    AD-22040756-1 Profile Picture
    AD-22040756-1 624 on at
    RE: Disable Contact creation from Customer Card

    The above replies are wrong. You do not need a customization for this. In the Marketing Setup Page, under Bus. Relations Code ensure the Customer Code is empty. If this code is empty, when you create a Customer the system will not create a Contact.

    The caveat of this is that you will need to manually connect a customer to a contact on the contact card, if required.

    Look at the bottom of this link: stoneridgesoftware.com/.../

  • Suggested answer
    Amit Baru Profile Picture
    Amit Baru 3,025 on at
    RE: Disable Contact creation from Customer Card

    Hi,

    For this you have to do customization for that.

    Regards

    Amit Sharma

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Disable Contact creation from Customer Card

    Hi,

    Yes you can do that you have to consult with your developer to prevent this,

    There is a function is available In customer table, you can call as per below while inserting new Customer record.

    SetInsertFromContact(false)

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans