how to Get custom field value in record view in record.js. I am trying to get custom field value but it keeps popping up saying "undefined".
How you are trying to get custom field value in record js? this.model.get('field_name') will give value of field ,even if it is custom field or standard field.
still undefined . I am doing it through render function, any thought?
Ok.Whether that field is having initial value or default value or any value.If yes, below code will work,
this.on('render', this._getValue, this);
Ajay's code should do the trick. You get an undefined value because the record is being rendered twice, you will see it when you try to use console.log(). In the first render you get an undefined value while on the second render it gives you the correct value. I guess the first render was the initializations of all the models.
Retrieving data ...