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

Notifications

Announcements

No record found.

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,060 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,060 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans