I know, I know, "JS" in JSON and "j" in jQuery stands for JavaScript. Feel free to edit the title if you find a better formulation.
When I type in the URL "http://beep-beep" in my browser, I get a nicely formatted JSON file containing "{sound: 'beep', occurence: 2}", meaning the web service works as supposed to. Then I thought to myself: let's do that in CRM, in onLoad
function for the creation of an entity. So, I'm trying to execute the following, copied directly from the SDK.
alert("Commence.");
$.ajax({
type: "POST",
url: "http://beep-beep",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
alert("Yippi!");
}
});
alert("Finish.");
However, the code crashes telling me that "$" is not a defined symbol. Isn't jQuery an integral part of CRM JavaScript engine?! What am I missing here? Is there an easier way to consume a JSON feed?