Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Suggested answer

IServiceEndpointNotificationService is returning null all the time.

Posted on by 3,610

Below is my code snippet. However, I got null everytime from the service. Any idea how can I resolve it?

IServiceEndpointNotificationService cloudService = (IServiceEndpointNotificationService)serviceProvider.GetService(typeof(IServiceEndpointNotificationService));
            if (cloudService == null)
                throw new InvalidPluginExecutionException("Failed to retrieve the service bus service.");

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,962 Moderator on at
    RE: IServiceEndpointNotificationService is returning null all the time.

    Hi,

    Can you try executing below code without checking null to see if it works.

    string response = cloudService.Execute(new EntityReference("serviceendpoint",

                   serviceEndpointId),

                   context);

  • Mohsin Ali Profile Picture
    Mohsin Ali 3,610 on at
    RE: IServiceEndpointNotificationService is returning null all the time.

    Service endpoints are already registered.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,962 Moderator on at
    RE: IServiceEndpointNotificationService is returning null all the time.

    Hello,

    You will have to register service endpoint first using Plugin registration tool where you need to provide service bus connection string.

    docs.microsoft.com/.../walkthrough-configure-azure-sas-integration

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans