i’m trying to populate a row with createRow.
I can add values to other fields, but I can’t add a value to the
is_True__c field, which is a checkbox
skip_day = function (args_obj){ var year = args_obj.year;
var month = args_obj.month;
var day = args_obj.day;
var skip_date = year + ‘-’ + month + ‘-’ + day;
var new_row = skip_day_model.createRow({ additionalConditions: o {field:‘is_Test__c’,value:true} ], doAppend: true });
console.log(new_row);
skip_day_model.save();
return new_row; }
skip_day({year:2017,month:1,day:1});
Object {Id: “16”, Id15: “16”}
Object {Id: “16”, Id15: “16”}
You might want to try putting the true in quotes, like so:
var new_row = skip_day_model.createRow({ additionalConditions: [ {field:‘is_Test__c’,value:‘true’} ],
Moshe, for me, at least, that does not work
Mock = function(){ this.skip_day = function (args_obj){
var year = args_obj.year;
var month = args_obj.month;
var day = args_obj.day;
var skip_date = year + ‘-’ + month + ‘-’ + day;
var skip_days = skuid.model.getModel(‘Cal_Skip_Day’);console.log(skip_days);
var new_row = skip_days.createRow({ additionalConditions:
{field: ‘Skip_Day_Date__c’, value:skip_date},
{field:‘is_Test__c’,value:‘true’}
],
doAppend: true
});
console.log(new_row);
skip_days.save();
return new_row;
};
this code creates a row, but the field ‘is_Test__c’ is not given a value
Mock = function(){ this.skip_day = function (args_obj){
var year = args_obj.year;
var month = args_obj.month;
var day = args_obj.day;
var skip_date = year + ‘-’ + month + ‘-’ + day;
var skip_days = skuid.model.getModel(‘Cal_Skip_Day’);console.log(skip_days);
var new_row = skip_days.createRow({ additionalConditions: e
{field: ‘Skip_Day_Date__c’, value:skip_date},
{field:‘is_Test__c’,value:true}
],
doAppend: true
});
skip_days.updateRow(new_row,{is_Test__c:true});
console.log(new_row);
skip_days.save();
return new_row;
};
this code creates a row, and the is_Test__c field is created and has the value true
I’m running in to the same problem here: { field: ‘Kiosk_Registration__c’, value: true} I’ve tried: true ‘true’ 1 Nothing seems to work.
Figured it out - I forgot to add the boolean field to the Model I was trying to create a row on. Fixed the issue.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.