Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
Copper Contributor
Posts: 25
Registered: ‎09-27-2013

Sage.UI.Dialogs.raiseQueryDialog not firing callback funtion

Hello there,

 

I'm trying to utilise the javascript libraries a bit more but the .raiseQueryDialog doesn't seem to be working for me, in that it's not firing the callback function I pass as a parameter. Am i doing something wrong or is this a bug?

 

I've tried using console.log inside the function, and removing any arguments from it too, but to no avail: the query dialog pops up fine but then, nothing...

 

var fn = "function (ans) {if (ans) { invPrompt(); }}"

Sage.UI.Dialogs.raiseQueryDialog("Request", "Would you like to Email or Download the Document?", fn, "Download", "Email")

 

 

Thanks!

Highlighted
Employee
Posts: 629
Registered: ‎04-24-2009

Re: Sage.UI.Dialogs.raiseQueryDialog not firing callback funtion

Hi Nathan,

 

You are passing a string and not a function. Please try the following:

 

var fn = function(ans) {
	if (ans) {
		invPrompt();
	}
};
Sage.UI.Dialogs.raiseQueryDialog("Request", "Would you like to Email or Download the Document?", fn, "Download", "Email");

 

Thanks

 

Mike