Execute Query in Client Side Form_CustomValidate with Custom API

You have wrong code: (Press F12 in your browser and go to the Console panel to check for JavaScript errors)onoboa wrote:

$updated = res; //it must be the Currect Period Value
ew.alert(updated); //blank message // ← > $update > vs. > updated

if ($selected !== $updated) { // If you meant to compare the value returned from the server (> $updated> ), you need to put your code inside callback for the > $.get()> , otherwise > $updated > is always > “”

$(‘#r_period’).focus(); // Are you sure a row can be focused?

You may debug by, eg.

console.log($row);
...
console.log(res);
// etc.

You may also press F12 in your browser and go to the Network panel to check: