Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Change Lookup primary field Name value on Entities RetrieveMultiple/Retrieve Plugin Message

Posted on by 5

UCI behavior:

On our system we have a custom entity A that has a relationship with another Custom Entity B

Custom Entity B has the following fields:

  • Name (Custom Entity A has a Lookup field to this entity, it displays this primary field)
  • Name Spanish
  • Name English

Each time we create/update a record in the Custom Entity B, we update the Name field with the concatenation of the other two fields "Name Spanish | Name English".

Currently, we were managing the Lookup record language value via plugin code:

Custom Entity A

  • Message: RetrieveMultiple & Retrieve
  • PostOperation
  • Synchronous

Depending on the Users current language, we modify the lookup Name value to be the English or Spanish label. This is working on the legacy side, but on the UCI it does not.

While debugging this, the logic runs as expected, and the lookup.name is being change accordingly, but for some reason it does not get reflected on the UCI views/record form.


My question here is, does UCI support Lookup field name value modifications for RetrieveMultiple/Retrieve Message?

This type of workaround for managing language on lookup fields has been previously mention before on other forums by other Users, in the past this was working as expected, but now that we are migrating to On-premise V9.0, on the UCI the change does not get reflected, even though the logic internally does not fail.


If anyone has experienced a similar behavior when trying to modify the entities results on this Messages, any info would be appreciated.

  • Sergio D. Profile Picture
    Sergio D. 56 on at
    RE: Change Lookup primary field Name value on Entities RetrieveMultiple/Retrieve Plugin Message

    jolmo We are facing the exact same issue you've described. Cant seem to find solution for this. Were you able to resolve this and if so, how? Much appreciated! Sergio

  • Suggested answer
    Henry J. Profile Picture
    Henry J. 5,237 on at
    RE: Change Lookup primary field Name value on Entities RetrieveMultiple/Retrieve Plugin Message

    Hello,

    This is probably related to this:

    The legacy web client for model-driven apps is being replaced by Unified Interface. Unified Interface uses the FetchXml defined in the SavedQuery.FetchXml or UserQuery.FetchXml properties. For better performance, Unified Interface does not convert the FetchXml data to a QueryExpression before executing these queries as the legacy web client did.
    Therefore, queries that were modified in plug-in code for the legacy web client which used QueryExpression will not apply the same changes now that the query to support views is being passed using FetchExpression unless the plug-in code is written to apply same logic to FetchExpression queries.

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/best-practices/business-logic/implement-all-types-of-queries-when-filtering-preoperation-retrievemultiple#additional-information

    That being said, you are mentioning migrating to the Unified Interface on-premise v9.0.
    I'm curious as to why you would want to deploy it on-premise and not use the web client instead?

    It's important that to consider that the web client on Dynamics 365 Customer Engagement on-premise is NOT deprecated.
    This is specifically called out here:
    https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/faqs-transition-unified-interface#how-does-this-move-impact-on-premises-customer-and-what-will-happen-when-the-web-client-is-deprecated-do-web-client-forms-become-unsupported 
    So the web client will still be supported for them, as long as their on-premise version is supported.
    Support lifecycle for every product is detailed here: https://support.microsoft.com/en-us/lifecycle/search

    Henry

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans