How to fetch related records in JavaScript

Hi All,

I trying to fetch related records using the following methods,but 


var parentBean ='parentmodule', { id: parentId });
var relatedRecords =, 'relatedmodule');



But the results not displaying the related records.

Please help me to get solution for this

  • You must do something like that:


    relatedCollection =, 'relatedmodule');
     relate: true,
     success: function(data) {
     if (!self.disposed) {
     // do something
     error: _.bind(function() {
     }, this),
    complete: options ? options.complete : null,
     limit: -1,
     fields: this.getFieldNames()


    André Lopes
    Lampada Global
    Skype: andre.lampada