Skuid button using snippet not working when calling a class with button.

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
When i am calling an apex class with skuid button using java script snippet , the button is not executing the class all the time. The terrible thing is when i move to another tab and then again come back to the button tab then the button works fine and execute the class. Kindly let me know why this happening . It should call the class every time whenever i click on the button . plz suggest.
Photo of Nadin

Nadin

  • 80 Points 75 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,220 Points 5k badge 2x thumb
Nadin~

A few questions for you:

On the tab where the button is located:
  • Is there a page include on that tab? 
  • Is Load Lazy checked or unchecked?
  • What actions do you have on the tab for when the tab is first shown? Whenever the tab is shown? 
  • Are there any rendering conditions?
On the button itself:
  • What are the actions?
  • Is there a CSS class?
  • Are there any render conditions?
  • Any enable conditions?
If you put the button on a blank page with just 2 tabs (1 tab with just the button itself, and a blank 2nd tab), does it still do the behavior you described?

Thanks!
Karen
Photo of Nadin

Nadin

  • 80 Points 75 badge 2x thumb
Hi Karen,

The Tab has a page include.
the page has a title bar , there i have that button.
I have a java script snippet on that page.
That java script calling a apex web service method .
In that button , i am running the java script snippet. so that the method will execute.


Now i am added the Ajax toolkit in the page. Now its working good.

If you have any better suggestion  kindly suggest.

Thanks for the reply
Best Regards,
Nadin
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,220 Points 5k badge 2x thumb
Nadin~

Glad that you were able to fix it with the Ajax toolkit!

Karen