Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Set value for a fied when contact is created from exchange server side sync

Posted on by 2,139

Hi All!

We have setup a long time ago server side sync with our exchange server. All works fine. What my customer needs is for those contacts set a source named Email. So how can achieve that with a plugin? I need to fire a plugin on create action and check if the contact is creted by server side sync right?

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Set value for a fied when contact is created from exchange server side sync

    Hello,

    I can not comment on that because  I don't have exchange setup on my instance but I think you can check on your instance the contact records createdby value and based on that you can write your plugin code.

    Normally when user creates contact record from CRM UI the createdby value will have the logged user name.

    If contact is getting imported from OOB import wizard then createdby will be same as the user who is importing the record

    If contcat is getting created from the integration then createdby value will be same as user under which integration code is running.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • betlejuice Profile Picture
    betlejuice 2,139 on at
    RE: Set value for a fied when contact is created from exchange server side sync

    Hello!

    Thank you for your answer! is SYSTEM user by default the createdby user for these records ?

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Set value for a fied when contact is created from exchange server side sync

    Hello,

    Can you not reply on Createdby column, for contact records which are getting created from exchange server will have different User set in Created by column. so in you plugin you can differentiate based on this column.

    Other option is to create a Two option field (Is Manual?) and set this field value to Yes from your Javascript code, so whenever record gets created from CRM, this will value Yes value otherwise No/Blank. This will work if you don't have any integration setup where Contact record is getting create and User is not using OOB import to create contact record.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • betlejuice Profile Picture
    betlejuice 2,139 on at
    RE: Get Contacts created from exchange server side sync

    Hi Leah! Thank you for your answer. I already look at the link before. I had not found any info about an attribute related with server side sync.

    Do you know how to get these contacts via C#?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get Contacts created from exchange server side sync

    Hi betlejuice,

    You can refer following link to check attributes of the contact entity:

    contact EntityType (Microsoft.Dynamics.CRM) | Microsoft Docs

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

Product updates

Dynamics 365 release plans