Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

custom hotkey help

$
0
0

I'm trying to make it so when alt+a is pushed it activates the search contact field. I haven't written js in a couple years, and am really rusty. Any help appreciated.

This is what I've written, it works in jsFiddle, but not in CRM.

document.onkeyup = function(e) {
var e = e || window.event; 
if (e.altKey && e.which == 65) {
alert ('keyboard shortcut working!');
return false;
}
}

This test code works for an alert in CRM:

function AlertPrimaryValue() {

var primaryValue = Xrm.Page.data.entity.getPrimaryAttributeValue();

alert(primaryValue);

}


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>