We have a button called refresh queue. This button is used to refresh the Cases queue on a skuid page.
var params = arguments,
_ buttons = params.component.element.buttons,_
$ = skuid.$;
_ var myModel = skuid.model.getModel(‘Case’);_
The snippet shown above is also taken from the community long ago. It worked properly at that time. Another problem is we didn’t use this page for the last month or more. So Can anyone help me on how to correct the code and make the button work again.
Try eliminating everythign from your code except these two lines:
var myModel = skuid.model.getModel(‘Case’);
That should do what you want.
Thank you. It worked. But I wanted what is going wrong with the above code. Can you tell me about it?
I tried action framework and had my button functioning properly. But I just wanted to know how a piece of code which used to work properly previously is not working now. What is cause of it?
My guess is that you’re getting some kind of exception on the line
buttons = params.component.element.buttons,
probably because something isn’t being passed in the arguments the way it was before.
Avinash, I’m not sure which Community post you were referring to where you made use of params.component.element.buttons, but that was using unsupported functionality. params.component.element.buttons was not supported for Page Title buttons - please see this article for a list of supported Snippet parameters:
Sure. I’ll go through the article.