Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

addOnKeyPress is not working

Posted on by 1,195

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

  • TNS Profile Picture
    TNS 1,195 on at
    RE: addOnKeyPress is not working

    Hi,

    I have done this but it is not working.

  • H V Profile Picture
    H V 347 on at
    RE: addOnKeyPress is not working

    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
    TNS 1,195 on at
    RE: addOnKeyPress is not working

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

  • H V Profile Picture
    H V 347 on at
    RE: addOnKeyPress is not working

    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
    TNS 1,195 on at
    RE: addOnKeyPress is not working

    It is already set to no.

  • H V Profile Picture
    H V 347 on at
    RE: addOnKeyPress is not working

    Hi,

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

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

    Hope this helps!

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans