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)

Javascript addpresearch not working in UCI

(1) ShareShare
ReportReport
Posted on by

HI Team

Javascript addpresearch not working in UCI, throwing error as "

UciError: Required parameter is null or undefined: handler"

Could you please help on this?

*This post is locked for comments

I have the same question (0)
  • ravikiranpatil24 Profile Picture
    5 on at

    Not working for me as well. Is there any bug around this?

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Can you please provide code you use?

  • Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    Hello Manasa,

    It will be more investigable if you can share the code. However, there are some threads that might be helpful for you. Please see below link:

    community.dynamics.com/.../addpresearch-and-not-working-in-dynamics-crm-365-v9

  • Community Member Profile Picture
    on at

    Hey Manasa,

    I have applied a addPreSearch script just recently in UCI and it works fine.

    I've noticed that the most important thing developing anything with JS for the UCI, is always to use the latest supported ways, which means you need to use the executionContext (and formContext) instead of the good old Xrm.

    On the other hand, if you know the procedure on how to apply a addPreSearch you will know, that you need to add the presearch via calling another function, which will add a fetchXML query via addCustomFilter. Unfortunately you cannot pass the formContext further when you call the second function.

    In order to do all this, I have come up with a little workaround using the execution context. I think the code says more than a thousand words. You simply will need to call the "LookupFilter" function onload and pass the executionContext as first parameter (tick the necessary box when adding the function on the form).

    pastedimage1573664560077v1.png

    Cool thing is, it also works inside the BPF. To accomplish that, simply add "header_process_" as a prefix for the fieldname if this field is in the BPF:
    pastedimage1573664641497v2.png

    I hope that my approach helps you or any other colleague from the Dynamics world experiencing issues with this requirement.

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