row is undefined

  • 1
  • Problem
  • Updated 5 years ago
  • Not a Problem
I have 2 popups on a calendar. they are basically copies of each other. The code for deleting the record being shown in the pop is failing in one popup, but not in the other

the "delete this record only" when I do console.log(arguments[0]); shows "undefined" for the row,
the same code works on the other popup. I have checked and the models are there, and the data is there
here is the code that is trying to run, identical on both forms
var params = arguments[0]; console.log(arguments[0]);
// data structure of arguments is different since we're not on a table
 row = params.row;
   $ = skuid.$;
Photo of ktyler


  • 9,334 Points 5k badge 2x thumb

Posted 5 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,702 Points 50k badge 2x thumb
I can confirm that Buttons in Page Titles in Custom Event Source popups are passed in the "row" argument as a parameter, so I think that your problem is that you're not setting row as a variable correctly using var. Try this, adding var in front of row:

var params = arguments[0]; 
var row = params.row;
var model = params.model;
var $ = skuid.$;