Passing data to custom template

I have created custom template, which is added before record layout. Now i want to display dynamic data of related record to that custom template .hbs file.

Below are the my record.js file code, which is overrite by me.


$viewdefs['Accounts']['base']['layout']['record'] = array(
'components' => array(
'layout' => array(
'type' => 'default',
'name' => 'sidebar',
'components' => array(
'layout' => array(
'type' => 'base',
'name' => 'main-pane',
'css_class' => 'main-pane span8',
'components' => array(
'view' => 'custom-template-modulewise', /////////here is custom template added
'view' => 'record', //////////here is default record view layout
'primary' => true,


Below are my custom template's javascript file. In javascript file, i get data from api call which is custom api. And i want to bind that api response to .hbs file.

so here are my javascript file code:


extendsFrom: 'RecordView',
className: 'custom-template-modulewise',
initialize: function (options) {
this._super('initialize', [options]);
var self = this;
var url = app.api.buildURL('/Accounts/GetData/'+this.model.get('id')); //This is custom api which is written by me, and it return related account all details.'read', url, null, {
success: function (response) {


My custom api response like this:

{"resp":200,"data":{"date_entered":"2019-03-19 10:34:46","date_modified":"2019-04-02 06:23:14",.....,"related_modules_count":{"total_opportunities":3,"total_bugs":0,.....}

And here is my .hbs file code, where i want to show dynamic data.


<div class="box red text-white bold">

Any one help me, to show this data to template.

Parents Reply Children
No Data