Uncaught TypeError: Cannot read property 'outputValues' of undefined

RajRaj
edited February 25, 2019 in Questions
I have a global action button 'credit pull' in a table. i am calling my apex class from,
global action button--> action type=run multiple actions-->Run Custom apex action--> my class name.

when i click on credit pull global action, i am getting an error like Uncaught TypeError: Cannot read property 'outputValues' of undefined

can any one help me, come out from this issue.

Comments

  • edited April 21, 2016
    I am also receiving this error when using a Skuid action to run a custom apex action that is referencing an InvocableMethod. Anyone have any updates on how to resolve this error?
  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    Can either of you post a screenshot of this error with the browser console exposed so we can see the javascript stack trace? 
    Can you also post a screenshot of the action configuration (Specifically the "run custom Apex action" detail properties. 

    Thanks. 
  • edited April 21, 2016
    Yes, Here is the configuration of the action in Skuid: 

    image

    And the corresponding error in the console: 
    image

    Let me know if you need any additional info!

    Thanks
  • edited February 25, 2019
    bump
  • edited April 29, 2016
    Hi Rob, 

    Just curious if you have any updates around this error? Any potential fix or workaround?

    Thanks!
  • edited February 25, 2019
    Checking on this issue (that Ross is working on for us.)  This issue was a bug caught in our live community, and it would be great if we could get this looked at.  FYI - the console error is thrown as a system admin as well.

    We have a custom apex action being called form a tab click, and the console shows the uncaught error that Ross posted the screen shot of.  I can send the org ID over if someone can take a look....  Thanks!
  • Jack SanfordJack Sanford San Antonio, TX 💎💎
    edited January 12, 2018
    Was everyone's error in community? Or has anyone gotten this error in non-community environments? We've had a lot of issues running Apex that relies on the AJAX toolkit in communities.
  • edited May 3, 2016
    We originally caught the bug inside the community, but the error is also occurring when previewing the page in standard Salesforce as a Sys Admin, so I don't think the problem is unique to the community. 
  • edited February 25, 2019
    Hi Chandra and Ross,

    This looks like an issue with how Skuid is handling custom apex actions. What parameters does your apex action take, and what is your apex action returning? If you could post just the first line of your apex function, that could help us debug.
  • edited May 3, 2016
    Yes here is the signature for our Apex action. It is a void method with no parameters so it does not take anything in nor return anything. 

    @InvocableMethod

    public static void obtainNotificationPreferences() {

  • edited May 3, 2016
    Ok, I'll have to dig a bit more, but I think this may be a bug with how skuid handles methods that do not return anything.

    I bet if you changed it to public static String obtainNotificationPreferences() and then returned an empty string or something, you wouldn't get the error.
  • edited May 3, 2016
    Thanks Ben, I just updated the method to return a List<String> but it looks like we are still receiving the error...
  • edited May 4, 2016
    Ok, I figured this one out. It looks like there's a bug with how Skuid works with actions that don't take any parameters. If you just change your action to take a List<String> parameter, and send in some dummy data, it should work. We'll try to get this patched in a patch release of Skuid.
  • edited May 6, 2016
    Thank you Ben, This has resolved the Uncaught Type error for output values. That being said, I am now receiving a Post request error 404 (bad request). This may be an issue with my apex action, so I am going to do some more debugging but wanted to let you know as well in case you have any info about this. 

  • edited May 6, 2016
    You might want to try deleting that action step and re-building it in Skuid. There may be some inconsistencies with the input now that the signature of the apex action has changed.
  • edited May 16, 2016
    Ben, recreating the action step altogether did the trick, we are now able to successfully launch the apex action from the Skuid action when the page is accessed in standard Salesforce environment. When we run the action from a page within the Salesforce Community, we receive an error 503 (service unavailable). I see above Jack Sandford is having issues running this kind of Ajax request from Communities, do you have any information about this?

    Thanks. 
  • Jack SanfordJack Sanford San Antonio, TX 💎💎
    edited May 25, 2016
    Ross - are you loading the AJAX toolkit as an external Javascript resource? I'm not sure this helps in community but is needed sometimes. Add a new javascript, with a Resource Location of External, and a URL of " /soap/ajax/37.0/apex.js "
  • Jack SanfordJack Sanford San Antonio, TX 💎💎
    edited May 25, 2016
    Also if you can post your console log for when you try and run this in community that could be helpful
  • edited December 6, 2016
    Jack - I added the javascript resource (as version 36, since it matched the error but also tried version 37) and it is still throwing the same error.

    image


    The error:

    image

    I did check and ensure the community profile has access to this Apex class, and it does.

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!