Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

how to override lookup with respect to enum value element.

(0) ShareShare
ReportReport
Posted on by 31
I have this requirement:
 
Firstly i have to extend base enum and add element named  / Transfer order/
Now i have to add lookup on the existing lookup for the transfer orders now because for every enum type the lookup is different now i want lookup for transfer order.
I have created lookup for transfer order but it is appearing on every enum type i wanted my lookup only for transfer order that i added on base enum.
 
This is the code that i write for override lookup:
 
 
 
 
By this code lookup is appearing on every enum
  • Verified answer
    Martin Dráb Profile Picture
    231,782 Most Valuable Professional on at
    how to override lookup with respect to enum value element.
    Well, you're completely missing a condition saying that you want your custom logic only for transfer orders. But don't bother adding it, because the whole approach is wrong.
     
    The standard logic already supports the scenario. It uses the plugin framework to create a specific class implementing CaseIAssociation intrerface and calling its performLookup() method. You just need to implement such a class for transfer orders.
     
    For example, look at CustTransCaseAssociationProvider. Don't miss ExportMetadataAttribute - that's what tells the class factory which class should be used for a particular value CaseEntityType enum.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,916 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,782 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans