How to fetch related records for a collection

I have a module called cpr_custom_product_pricing, that has a field called producttemplate_id_c pointing to ProductTemplates. How to get the associated productTemplate name during fetch? I tried RelatedCollection fut I get an error:

let custom_pricing_bean = app.data.createRelatedCollection("cpr_custom_product_pricing","ProductTemplates");
custom_pricing_bean.fetch({
fields: ["quantity", "price", "name", "id", "start_date", "end_date","producttemplate_id_c"],
filter:[
{
account_id_c: {'$equals': account_id}
}
],
relate:true,
success:function(rows)
{
let results= [];
let i=0;
for (i=0;i<rows.models.length;i++)
................................................
I get the error:
Uncaught TypeError: e._setRelatedCollection is not a function