I have created a global action on a table. The action calls a snippet which I have defined in the Resources tab. When I click on the Action button, nothing seems to happen. I have also added an alert() code in the snippet to check if the snippet gets called at all. But nothing happens. Any suggestions to solve this problem?
Thanks in advance
Thanks in advance
-
332 Points
Posted 3 years ago
-
568 Points
Can you click on "F12" and look at console. Is it throwing any error?
Thanks,
Goutham
Thanks,
Goutham
-
332 Points
I opened the console with cmd + Space --> console. I cannot see any errors thrown in the console window.
Matt Sones, Champion
-
31,702 Points
Checking a simple thing: make sure the name of your snippet is the same as the name that you entered in the global action settings.
-
332 Points
Thanks for the suggestion Matt. It is the same name. In fact, I just copied the name of the snippet and pasted it in the global action settings. No change to the result.
Ben Hubbard, Employee
-
12,530 Points
Hi Namrata,
What is the "Resource Location" property set to on your snippet? Also, can you paste the actual contents of your snippet?
What is the "Resource Location" property set to on your snippet? Also, can you paste the actual contents of your snippet?
-
332 Points
Ben,
Resource Location Property is In-Line(Snippet). Here is the content of the snippet. The alert code is there to check if the Snippet gets called. The snippet calls fetches data from Yodlee and saves it in application model.
var appModel = skuid.model.getModel('applicationYod');
var appRow = appModel.data[0];
alert("callYodlee Snippet called");
var result = sforce.apex.execute('SkuidYodleeCallCtrl','doYodleeCallForParty',
{
applicationId : appRow.Id,
partyId : appRow.Contact__c
});
alert(result);
window.location.reload();
Thanks,
Namrata
Resource Location Property is In-Line(Snippet). Here is the content of the snippet. The alert code is there to check if the Snippet gets called. The snippet calls fetches data from Yodlee and saves it in application model.
var appModel = skuid.model.getModel('applicationYod');
var appRow = appModel.data[0];
alert("callYodlee Snippet called");
var result = sforce.apex.execute('SkuidYodleeCallCtrl','doYodleeCallForParty',
{
applicationId : appRow.Id,
partyId : appRow.Contact__c
});
alert(result);
window.location.reload();
Thanks,
Namrata
Ben Hubbard, Employee
-
12,530 Points
Hmm, everything looks totally fine to me. I'm baffled if you're not getting any javascript errors. Can you grant login access to skuid following these instructions?
-
332 Points
sure I can do that.. I am uploading a screen shot. After I read your comment, I opened Inspect element --> console and I see these errors...I had opened the CMD + SPACE --> console, but that didn't give any errors.


Matt Sones, Champion
-
31,702 Points
var appModel = skuid.model.getModel('applicationYod');
That line is returning null. Make sure you have a model named 'applicationYod'
Also, in general, .getFirstRow() is better than .data[0]
That line is returning null. Make sure you have a model named 'applicationYod'
Also, in general, .getFirstRow() is better than .data[0]
Ben Hubbard, Employee
-
12,530 Points
Yeah Matt is right, can't read property 'data' of undefined most likely means your getModel call is not returning a model. Make sure your 'applicationYod' is the exact, case sensitive name of your model.
-
332 Points
Thank you for the suggestion Matt. The snippet gets called. But now it throws another error.
Uncaught TypeError: Cannot read property 'push' of undefined
XMLHttpRequest cannot load https://na34.salesforce.com/_ui/common/request/servlet/JsLoggingServlet. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://genesisextn.na34.visual.force.com' is therefore not allowed access.
What should I look at to resolve this issue? Thanks again for your comments.
Uncaught TypeError: Cannot read property 'push' of undefined
XMLHttpRequest cannot load https://na34.salesforce.com/_ui/common/request/servlet/JsLoggingServlet. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://genesisextn.na34.visual.force.com' is therefore not allowed access.
What should I look at to resolve this issue? Thanks again for your comments.
Related Categories
-
Tables and Filters
- 242 Conversations
- 232 Followers
-
Integration and Custom Processes
- 238 Conversations
- 171 Followers