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 :
Microsoft Dynamics CRM (Archived)

addOnKeyPress is not working

(0) ShareShare
ReportReport
Posted on by 1,197

Hi,

I am working in dynamics 365 v9.0 online, I am trying to get the auto complete functionality on web not for mobile or templates by using JS, in which I have used addOnKeyPress. But I am getting error "Cannot read property 'addOnKeyPress' of null. Then I have checked and searched on web I found that this method has been deprecated for v 9.0 and we have to use a custom control.

I have tried to use custom control but it didn't worked. Any suggestion will be very helpful.

*This post is locked for comments

I have the same question (0)
  • H V Profile Picture
    351 on at

    Hi,

    Go to Settings -> Administration -> System Settings -> General

    Please set "Use legacy form rendering" to "No".

    Hope this helps!

  • TNS Profile Picture
    1,197 on at

    It is already set to no.

  • H V Profile Picture
    351 on at

    Hi,

    I think you are working on Unified Interface, The addonkeypress event is now deprecated and will not be supported on the unified interface. Use onchange instead of addonkeypress.

    Hope this helps!

  • TNS Profile Picture
    1,197 on at

    But from on change how can I  achieve auto complete requirement.... can you give me any idea..

  • H V Profile Picture
    351 on at

    Hi,

    If you want to achieve auto complete requirement of Dynamics 365 Data, then you can use "auto complete" control as per below image:

    autocomp.png

  • TNS Profile Picture
    1,197 on at

    Hi,

    I have done this but it is not working.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans