BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Xander,
The addParams function is designed to accept parameter values as string and function and hence it is not considering the integer type parameters.
We have confirmed that the issue with “Adding integer type custom parameter” is a defect and we have logged a defect report. The fix for this issue will be included in our Volume 1, 2014 release on the month of April.
For now we can add the integer type parameter to the url by passing function as the parameter. The parameter function will return the integer value. Please refer the following code snippet.
grid_actionBegin = function (args) { args.model.query = ej.Query() .addParams("serviceId", serviceId) .addParams("view", view); }
function serviceId() { return 3; }
function view() { return "Default"; }
|
For your convenience, we have created a simple sample please find the sample from the attachment.
Please let us know if you have any queries.
Regards,
Madhu Sudhanan. P
Hi Xander,
The addParams will provide parameters that can be added to the query. While generating query, the parameter types are not considered so single quotes are not added to the string type parameters.
If we want to pass the string type parameter through the URL, we have to wrap the parameter with the single quotes as follow.
function action(args) { args.model.query = ej.Query().addParams("view", param2); }
function param2() { return "'Default'"; }
And hence it will be added in the url as follow.
http://localhost:30739/Main.svc/GetServiceUsersByService()?view=%27Default%27
|
Please let us know if you have any queries.
Regards,
Madhu Sudhanan. P
Hi Xander,
Ok, thanks for your update.
Please get to us back if you require further assistance, we will be glad to help you out.
Regards,
Madhu Sudhanan. P