Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Plugin - Attribute not in dictionary - Only Case Description

Posted on by Microsoft Employee

Hi,

I have create a plugin for an incident, for when it is marked and an Incident or request it posts to my external service, all works well, however when I try and get the Incident Description there is no key there:

 myCase.description = entity.Attributes["description"].ToString();

I have debugged the plug in and as suspected there is no description Attribute, everything else works fine, am I missing something.

The plugin Stage in "On Create" of "Incident" and is Post-Operation and Synchronise on Server.  After the stage I have a POST image.  Any ideas as to why I am not getting the description field through?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin - Attribute not in dictionary - Only Case Description

    Thanks for that, I wasn't using the post image, doh

  • Verified answer
    Temmy Wahyu Raharjo Profile Picture
    Temmy Wahyu Raharjo 2,914 on at
    RE: Plugin - Attribute not in dictionary - Only Case Description

    Hi, when you get the desc. Make sure you used the post image. Not the target one.

    var incidentTarget = (Entity)_context.InputParameters["Target"];

    var incidentPostImage = (Entity)_context.PostEntityImages["PostImage"];

    Used incidentPostImage, not incidentTarget.

  • Michel van den Brink Profile Picture
    Michel van den Brink 4,697 on at
    RE: Plugin - Attribute not in dictionary - Only Case Description

    Hello,

    How are you retrieving the Case entity in your plugin?

    Are you using the context.InputParameters["Target"]?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans