web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    RE: Javascript addpresearch not working in UCI

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

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Javascript addpresearch not working in UCI

    Hello,

    Can you please provide code you use?

  • Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at
    RE: Javascript addpresearch not working in UCI

    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
    RE: Javascript addpresearch not working in UCI

    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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans