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

Multiselect OptionSet is always null in plugin post-image

(0) ShareShare
ReportReport
Posted on by 215

Hello everyone,

I have registered a post-image (with all attributes) for my plugin in CRM Online.

However, the multiselect optionset field is always null when I get it from the post-image.

Entity postImageEntity = (context.PostEntityImages != null && context.PostEntityImages.Contains(this.postImageAlias)) ? context.PostEntityImages[this.postImageAlias] : null;
var values = postImageEntity.GetAttributeValue("new_multioption");

If I retrieve the record using the service.Retrieve, then everything works fine. But this is not good at performance.

Does anyone know why this happens?

Thanks,

Kim Anh

I have the same question (0)
  • Anh Luu Profile Picture
    215 on at

    Any ideas?

  • Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Multiselect optionsetset field is not available in filtering attributes and pre/post image.

    See below article for your reference and workaround.

    blog.magnetismsolutions.com/.../triggering-plugins-on-update-of-multi-select-option-set-in-dynamics-365

    Above article is older, so I would suggest you to use latest version of plugin registration tool and instead of selecting all attributes in post image. Check and see if multi select option is appearing in list of attributes.

    Download latest sdk tools - http://xrm.tools/

    If found helpful, Please mark my answer verified.

  • Menna El Sayed Galal Profile Picture
    on at

    Hello Kim,

    Please make sure that the multiSelect Optionset field is appearing in the parameters list inside the plugin registration tool and is being marked as below

    if not please use the latest update of the tool.

    pastedimage1597137073464v1.png

    if the problem still exist please share with me the line of code of retrieving the image attribute values.

    Thanks,

  • Anh Luu Profile Picture
    215 on at

    Hi Menna El Sayed Galal,

    Yes, the MultiSelect attribute is shown in the registration tool, but the issue still exists.

    Here is the code I use to get the value of the MultiSelect field from the image:

    Entity postImageEntity = (context.PostEntityImages != null && context.PostEntityImages.Contains(this.postImageAlias)) ? context.PostEntityImages[this.postImageAlias] : null;
    var values = postImageEntity.GetAttributeValue("new_multioption");

    Thanks for your help,

    Kim Anh

  • Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    The code you mentioned is not from image instead you are getting it from service call Retrieve.

    Can you pls confirm if you have used different code to get value from image.

    Please Mark My Answer Verified If I Were Helpful

  • Anh Luu Profile Picture
    215 on at

    Hi Bipin Kumar,

    I updated my post (my code is correct, but I had some mistakes when copying the code here).

    The point here is that when I debug the code, I see that the multiselect attribute in the post-image is always null.

    Have you experienced this issue before? And you could really get the value of multiselect field in the post-image?

    Regards,

    Kim Anh

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Today I verified in my instance and i was able to get multi optionset field value from post image.

    I have registered plugin steps on Account entity, message is create and execution pipeline is Post Operation. Also I have registered post image and selected multi optionset fields.

    See below screenshot and highlighted section where we are able to get multi optionset value.

    8585.CQ2.PNG

    Please Mark My Answer Verified If I Were Helpful

  • Dung Ho Profile Picture
    40 on at

    Hello Kumar,

    Have you tried with the Post-Update plugin? I got the same issue before with the image of Post-Update plugin (not Post-Create in your case).

    Could you please check that?

    Thanks.

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 74 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans