Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Synchronization of contact with customer for custom fields not working.

Posted on by Microsoft Employee

Hi,

Synchronization of contact with customer is working correct for normal fields nut not for custom fields. I have four custom fields in the customer table. I copied these fields to the contact table so they have the exact same name etc.. I expected it to work in this simple way. Or is necessary to write code for this?

Can somebody give me a hint?

Thanks,

Patrick

*This post is locked for comments

  • mmv Profile Picture
    mmv 11,465 on at
    RE: Synchronization of contact with customer for custom fields not working.

    Hi,

    If you want to modify it back and fro, I think this solution is ok.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Synchronization of contact with customer for custom fields not working.

    Hi Mahesh,

    I was afraid for a cycle but it seems to work without problem.

    Perhaps, because the value in both tables is the same after the first update, the modify event will not trigger.

    I don't have a better solution at this moment, but any suggestion is welcome.

    Thanks.

    Patrick

  • mmv Profile Picture
    mmv 11,465 on at
    RE: Synchronization of contact with customer for custom fields not working.

    Hi,

    It purely depends on ur requirement.  In the above block of code, anytime if there's a change, it will update to both Customer and Contact.  If you use the MODIFY(TRUE), don't you think that it will become cyclic?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Synchronization of contact with customer for custom fields not working.

    Hi Mahesh,

    I'am not talking about creation but modification.

    See my latest response.

    Thanks

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Synchronization of contact with customer for custom fields not working.

    I added one row of code to the OnModify event of both Contact and Customer table:

    ("Custom Field" <> xRec."Custom Field")

    This small modification does the job!

    But i'am still not sure this is the best solution?  

  • mmv Profile Picture
    mmv 11,465 on at
    RE: Synchronization of contact with customer for custom fields not working.

    Hi,

    Are you talking about the Create Customer functionality in the Contact?  If that's the case, you may refer the "CreateCustomer" function in the Contact table (you may add in the extra fields in that code block).

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans