loop.getNumber is not a function

  • 1
  • Question
  • Updated 3 years ago
  • Answered
What can I do about this error:
Uncaught TypeError: loop.getNumber is not a function

With this snippet:
var loop = 1;
var date = Proto.getFieldValue(protoappt,'Date__c');
// ACTION CODE - loop and set non default values
while(loop != 10){
var row = Mass.createRow({
additionalConditions: [
{field: 'Date__c', value: date}
]
});
loop.setNumber(loop.getNumber() + 1);
date.setDate(date.getDate() +7);
}
Photo of Griffin Brown

Griffin Brown

  • 2,766 Points 2k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Griffin Brown

Griffin Brown

  • 2,766 Points 2k badge 2x thumb
I'm an idiot - it was a data parsing issue between SF and JS date formats
Photo of Emily Davis

Emily Davis, Employee

  • 3,502 Points 3k badge 2x thumb
Glad you figured it out, Griffin!