Is a Row a object record?

  • 1
  • Question
  • Updated 4 years ago
I'm sending parameters to an apex class using sforce.apex.execute and want to send an sObject record as a parameter

var result = sforce.apex.execute(    'eventSKUIDnewmember',
    'newmember',
    {newmember:row1
    });


 - so my question is how can I get a specific record from SKUID - can I use row?

where:
var row1 = m1.getFirstRow();
Photo of Simon Parker

Simon Parker

  • 420 Points 250 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Moshe Karmel

Moshe Karmel, Champion

  • 8,646 Points 5k badge 2x thumb
That's an interesting approach... Did you try running this for real? I had a different approach where I take the row and turn it into a JSON string, I pass it into the Apex method as a String, and then use Apex to deserialize the string into an sObject.
Photo of Simon Parker

Simon Parker

  • 420 Points 250 badge 2x thumb
How did you JSON serialize the row? Manually or is there a method?
Photo of Moshe Karmel

Moshe Karmel, Champion

  • 8,646 Points 5k badge 2x thumb
I did this to stringify my whole model:
var JSONString = JSON.stringify(myModel.data);
But you could probably just stringify the row
var rowStr = JSON.stringify(row1);
Check it out in the console and see how it looks...