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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Passing value to lookup search field programmatically

(0) ShareShare
ReportReport
Posted on by 212

Hello. I am using CRM 4.0. I have a custom entity (with a number of records added) which has been added to the case (incident) entity form as a lookup. When you open this lookup on the case form, you can search for specific records in the lookup by entering a value in the search field. I would like it so that through JavaScript, I could pass a certain value to this lookup search field (for e.g. to run onFormCreate), so that when I open the lookup on the case form, the value is passed to the lookup search field and only those records that match the search value are shown. Is this possible?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    There are a few ways to do it. I would first Lookup at Daniel Cai blog article about filtered lookup:

    danielcai.blogspot.com/.../crm4-filtered-lookup.html

    You can also use something like this. Don't remember exact syntax, but probably close:

    crmForm.all.fieldName.additionalParams="search=" + searchValue;

    Hope this helps.

  • synthesis Profile Picture
    212 on at

    I initially tried crmForm.all.fieldName.additionalParams="search=" + searchValue; but it did not work, but changing additionalParams to additionalparams worked:

    crmForm.all.fieldName.additionalparams="search=" + searchValue;

    Thanks!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans