Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Retrievemultiple give input parameter as FetchExpression object in model driven app

Posted on by 65

Hi,,

I have plugin written on retrievemultiple of entity. It triggers on subgrid view. This plugins works on normal UI of dynamics 365.

But when I try this through model driven app, this plugin does not works.

While debugging the plugin I found out that.

Context.inputparmeter["Query"] return me FetchExpression object in model driven app and Context.inputparmeter["Query"] return me QueryExpression object in normal UI. exactly there my code breaks. 

Can anyone help me out with how to handle this situation and how retrieveultiple return different object in model driven app and normal UI.

  • erhan.keskin Profile Picture
    erhan.keskin 2,247 on at
    RE: Retrievemultiple give input parameter as FetchExpression object in model driven app

    Hi,

    If you want to manage both Classic UI and Unified Interface in D365 for RetrieveMultiple plugin, then you can understand what is what depending on the type of Query parameter.

    Classic UI: Query Expression

    if (context.InputParameters["Query"] is QueryExpression)

    {

    var  queryExpression = context.InputParameters["Query"] as QueryExpression;

    Unified Interface: FetchExpression

    if(context.InputParameters["Query"] is FetchExpression)

    {

     var  fetchExpression = context.InputParameters["Query"] as FetchExpression;

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

Product updates

Dynamics 365 release plans