Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Dynamics 365 Realtime Marketing Event integration using c# plugin

(0) ShareShare
ReportReport
Posted on by

Hello Experts,

I am trying to use c# plugin to register Realtime marketing event. But I am getting error :   Object reference not set to an instance of an object    at line where I initiate Analytics object.
Has anyone does this before?   Is there any work around apart from plugin:

Event is :   On create of Order.

Readymade Code snippet I got in the event is:
pastedimage1629876168181v1.png

Relevant microsoft documentation is here: https://docs.microsoft.com/en-us/dynamics365/marketing/real-time-marketing-custom-events 

Please let me know if anyone has done this.

Thank you in advance 

  • Suggested answer
    Nya Profile Picture
    29,060 on at
    RE: Dynamics 365 Realtime Marketing Event integration using c# plugin

    Hi,

    Would you please specify which version of security protocol you're using in your code?

    You may try to adjust it to TLS 1.2 if it is another version.

  • Community Member Profile Picture
    on at
    RE: Dynamics 365 Realtime Marketing Event integration using c# plugin

    But the code is failing while creating an object itself. So can not go to next line.

  • Suggested answer
    Nya Profile Picture
    29,060 on at
    RE: Dynamics 365 Realtime Marketing Event integration using c# plugin

    Hi,

    Please try to add the following layer out of your code analytics.xxx.

    if (analytics != null)
    {
    // your original operations
    }
    else
    {
    // other operations
    }

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Holly Huffman Profile Picture

Holly Huffman 103

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 96 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 51 Most Valuable Professional

Product updates

Dynamics 365 release plans