I am trying Salesforce chrome plugin for the first time. It is working for me. I was referring one of the existing plugin code found on web and was trying to execute it but I am having issues.
I am using the following in pop.js referred in popup.html. This is used in default_popup in manifest.json file. The following gets called when I click a button on the popup.html. I have included the necessary js files in the popup.html. Looks like my forcetk connection and query not working. I am new to this. Can you please help?:
function init() {
// Get an instance of the REST API client and set the session ID
var client = new forcetk.Client();
client.setSessionToken(getValueFromCookie("sid"));
// Find cases that belong to the current user
client.query("select Id from Account Limit 10", function(response){
console.log('msg posted', response);
buildResults(response);
});
}
I am seeing the following error in the console.log:
GET chrome-extension://ajfjakhbbenblfoajmhjlfhajgkheflc/services/proxy?_=1420682846541 net::ERR_FILE_NOT_FOUNDjquery.js:6 x.support.cors.e.crossDomain.sendjquery.js:6 x.extend.ajaxforcetk.js:162 forcetk.Client.ajaxforcetk.js:449 forcetk.Client.querypopup.js:112 initpopup.js:131 (anonymous function)jquery.js:5 x.event.dispatchjquery.js:5 y.handle