web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to remove a Table from a Lookup field

(1) ShareShare
ReportReport
Posted on by 34
Hello,
 
Can someone help me how I change what tables a look up field can look up?  I have a field which looks up Accounts, Contacts and Users but I want to remove Users from the list.
 
I have the same question (0)
  • Suggested answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,

    This can be implemented using the following API.

    In my testing, this API was used to filter the From field of the email entity to show only the queue entity type.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me .
     
    Best Regards,
    Dengliang Li
     
  • RM-30040732-0 Profile Picture
    34 on at
    Thanks! This is exactly what I want!
     
    Can you talk me through in more detail how to enter that code?  I am unfamiliar with api and the link doesn't tell me how to add it to my app.
     
    Thanks!
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    The code is below:
     
    function addFilter(executionContext) {
        var formContext = executionContext.getFormContext();
        formContext.getControl("from").setEntityTypes(["queue"]);
     
    }
     
    Register the code to the onload event of the Enhanced Form of the mail entity.
     
    Upload the JS file and name it
     
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me .
     
    Best Regards,
    Dengliang Li
     
  • Verified answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    Has the issue been solved?
    Have there been any updates? Please feel free to ask me if you have any questions!
    If it has been resolved, can you mark the response as an answer?
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 130 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 117

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans