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

Announcements

No record found.

News and Announcements icon
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 

I have the same question (0)
  • Suggested answer
    Nya Profile Picture
    29,064 on at

    Hi,

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

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

  • Community Member Profile Picture
    on at

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

  • Suggested answer
    Nya Profile Picture
    29,064 on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 192 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 129

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans