I have a button on a list page that works just fine in 9.8 but the same code will not work in 10.1. The server side just grabs the primary key of the row and executes a stored procedure. When I look at developer tools in Chrome I see this error when I fire the button:
VM40:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Object.success (RunnerAll.js:365)
at j (loadfirst.js:1)
at Object.fireWith [as resolveWith] (loadfirst.js:1)
at x (loadfirst.js:1)
at XMLHttpRequest.b (loadfirst.js:1)
The server side code for the button is:
global $dal;
$record = $button->getCurrentRecord();
if ($record["Oid"])
{
$sql = "EXEC Process_hotel_res_request ";
$sql.= $record["Oid"];
$sql.= " ";
CustomQuery($sql);
}
Any help?
VM40:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Object.success (RunnerAll.js:365)
at j (loadfirst.js:1)
at Object.fireWith [as resolveWith] (loadfirst.js:1)
at x (loadfirst.js:1)
at XMLHttpRequest.b (loadfirst.js:1)
The server side code for the button is:
global $dal;
$record = $button->getCurrentRecord();
if ($record["Oid"])
{
$sql = "EXEC Process_hotel_res_request ";
$sql.= $record["Oid"];
$sql.= " ";
CustomQuery($sql);
}
Any help?