Skip to content
Datix
  • Services
    • Professional Services
    • Managed Services
    • Support Services
  • Solutions
    • Infor CloudSuite Industrial | SyteLine
      • ERP For Medical Device Manufacturers
    • ERP Integration
      • Epicor® Salesforce Integration
      • Infor Salesforce Integration
      • Epicor® Dynamics 365 Integration
      • Infor Dynamics 365 Integration
      • HubSpot Epicor® Integration
      • HubSpot Infor Integration
      • Currency Exchange Rate Integration
    • Microsoft Dynamics 365 CE
    • Salesforce
    • Microsoft Azure
    • EverSafe!
    • PandaDoc
  • Resources
    • Guides & White Papers
    • Epicor Training Videos
  • Why Datix
    • Our Company
    • Our Leadership
  • Blog
Contact Us
Contact Us
Datix
  • Services
    • Professional Services
    • Managed Services
    • Support Services
  • Solutions
    • Infor CloudSuite Industrial | SyteLine
      • ERP For Medical Device Manufacturers
    • ERP Integration
      • Epicor® Salesforce Integration
      • Infor Salesforce Integration
      • Epicor® Dynamics 365 Integration
      • Infor Dynamics 365 Integration
      • HubSpot Epicor® Integration
      • HubSpot Infor Integration
      • Currency Exchange Rate Integration
    • Microsoft Dynamics 365 CE
    • Salesforce
    • Microsoft Azure
    • EverSafe!
    • PandaDoc
  • Resources
    • Guides & White Papers
    • Epicor Training Videos
  • Why Datix
    • Our Company
    • Our Leadership
  • Blog

Dynamics CRM Custom Lookup Feature

As a top Microsoft Dynamics CRM consultant, we get a lot of inbound questions regarding development and training related to this powerful CRM. In this installment of our series on free dev tutorials, our team demonstrates a Dynamics CRM custom lookup feature. For more tutorials on Dynamics CRM you can visit our blog.

In Dynamics CRM, the addCustomFilter() function allows a developer to specify criteria to be applied as a filter to a lookup field. Adding filter criteria is easy until the field you want to filter on is not explicitly related to the entity you’re looking up. To help with this, today we’re demonstrating how to spin up a Dynamics CRM custom lookup feature. In this example, we have an “Account Short List” entity that we want to use as a custom filter for an account lookup. We’ve added 3 accounts to the list, but you could add as many accounts as you want.

Executing Dynamics CRM Custom Lookup

dynamics crm custom lookup

We also created a “Test Account” entity that has an Account lookup field.

Dynamics crm Account Custom Fields

We’ve added the account lookup field to the Test Account form layout.

Dynamics CRM Account Form Account Lookup Added
One thing that’s important is that if possible, any data query happen asynchronously before the lookup is performed. In this case, we’re getting records from the account short list on page load. The query here does not have to be directly related to the lookup entity. If you have query filter criteria, which you probably will in a real-world scenario, you can use the $filter syntax in your OData query.
dynamics crm code

At this point, we have a javascript array populated with Account IDs that we want to use in our lookup filter. The fetchXml for the addCustomFilter() function allows an “in” operation. We’ll be using this feature to look for Account GUIDs. We can do a quick javascript loop over the array to build the fetchXml string and add the string as the account field’s filter. As a quick note, to keep the example simple, no check was added for an empty short list, but you should consider this scenario in production code.

dynamics crm code lookup


Wrap-up — Dynamics CRM Custom Lookup

These tools should help your business successful execute a Dynamics CRM custom lookup feature inside of your instance. There a wide number of uses for this kind of functionality that are not just limited to a sales team. In fact, we’ve done a lot of our development work recently for service-facing organizations that want to mold the CRM to help manage other parts of their business. For more information about our ability to assist with Dynamics CRM custom development, or deployment of Dynamics CRM software system, contact our experts today.

Want More From Your System?

Datix Transforms Business Through Software
Yes, Absolutely
More Posts
QMS Vs. ERP
Infor Increases AI Capabilities
CRM ERP Integration Architecture: Scalability
How to Anticipate Demand for New Product

Guides

Implementation Planning
Integration Planning
Industry Resources
Deadly ERP Sins
Upgrade or Replace an
Outdated ERP
10 Tips for Implementing a
New ERP
Increase Revenue with Your ERP
Beyond Quickbooks
Optimize Processes
Epicor BI
Maximize ROI
Salesforce vs Dynamics
Becky Lipnick
PrevPreviousComprehensive ERP Reviews Comparison Guide
NextBuyers Guide To Software Selection InfographicNext

Subscribe For More Content

Connect

Call Us (+1 800 259-6675)

9666 Olive Blvd Suite 580
St. Louis, MO 63132

Datix Has Your Back

  • Resources & Guides
  • Integration Packages
  • Solutions
  • Industries

Services

  • ERP Consulting
  • CRM Consulting
  • ERP Integration
  • Implementation
  • Training
  • Business Process Management
  • Continuous Improvement Plans

Our Partnerships

Datix Inc. is an independent provider of professional IT services and has no current affiliation or partnership with Epicor® Software Corporation. Third-party trademarks on this website are owned by their respective owners.

Copyright © 2023 Datix. All rights reserved. Privacy Policy