process JSON file from URL
<script>
oraclecrmod.onReady(function() {
if(oraclecrmod.ctx.isObject("Account") && oraclecrmod.ctx.isDetailPage()) {
var on_click = function() {
$.get( "/OnDemand/user/Rest/027/Accounts/", function(data) {
alert('page content: ' + data);
}
);
}
var tb = oraclecrmod.getTitleBar("AccountFormTB");
var bt = oraclecrmod.createButton({
id:"TestBtn",
text:"Test Read",
parent:tb
});
bt.on("click",on_click);
}
});
</script>
What's wrong with that code? Can anyone please help me?