Global Action not working

edited March 1, 2017 in Questions
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


  • edited November 19, 2015
    Can you click on "F12" and look at console. Is it throwing any error?

  • edited September 29, 2015
    I opened the console with cmd + Space --> console. I cannot see any errors thrown in the console window.
  • Matt SonesMatt Sones 💎💎💎
    edited February 10, 2017
    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.
  • edited September 29, 2015
    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. 
  • edited March 1, 2017
    Hi Namrata,

    What is the "Resource Location" property set to on your snippet? Also, can you paste the actual contents of your snippet?
  • edited September 29, 2015

    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 =[0];
    alert("callYodlee Snippet called");
    var result = sforce.apex.execute('SkuidYodleeCallCtrl','doYodleeCallForParty',
            applicationId : appRow.Id,
            partyId : appRow.Contact__c


  • edited March 1, 2017
    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?
  • edited September 29, 2015
    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 SonesMatt Sones 💎💎💎
    edited February 10, 2017
    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]
  • edited March 1, 2017
    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.
  • edited September 29, 2015
    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 No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.

    What should I look at to resolve this issue? Thanks again for your comments. 
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!