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 :
Microsoft Dynamics CRM (Archived)

Update Plugin Triggering on Create

(0) ShareShare
ReportReport
Posted on by 255

Hi

I have a plugin that runs on modifiedon date that gets updated contact entity data for sync to a SQL db.

It works fine on existing records but...

It appears that this plugin runs when a contact is "Created" and causes a Null Exception error.
I'm not sure what field id Null unless its the primaryEntityID (contactid) Perhaps its running before the contact has been added an so has an id??

Any thoughts?

Regards

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Stuie,

    Which event you registered your pug-in? You need to registered the plugin in post event as you are tracking the modified on date.

    Please check in plugin registration tool and update it in post event .

    Hope this helps.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hello,

    Register your plugin on Post create and synchronize

    Hope you can understand what I mean

  • Stuie Profile Picture
    255 on at

    Hi

    I'm using Post-Operation and Synchronous

  • Stuie Profile Picture
    255 on at

    7181.plugin.png

  • Verified answer
    Community Member Profile Picture
    on at

    you should register on Asynchronous. it was typo on last comment

  • Stuie Profile Picture
    255 on at

    The error (shown in a Scribe integration) is below.

    Notice this is triggered by  Create contact

    Operation failed. Label: Create contact, Name: contactCreate, Message: -2147220891:Unexpected exception from plug-in (Execute): ContactDataProcessing.GetContactDataPlugin: System.NullReferenceException: Object reference not set to an instance of an object. : Unexpected exception from plug-in (Execute): ContactDataProcessing.GetContactDataPlugin: System.NullReferenceException: Object reference not set to an instance of an object. : Error in calling Operation Create Server stack trace: at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)    

  • Stuie Profile Picture
    255 on at

    OK ill try that Jagmohan

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Stuie,

    Could you please debug the plugin and share the exact line where you are getting error.

    Also you can enable trace to check the exact error.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans