How to get parent module record id in subpanel list, also how i will get subpanel list record id when we click on any record

Hi Friends

How to get parent module record id in subpanel list, also how i will get subpanel list record id when we click on any record. Can anyone help me out from this.
Thanks in Advance.

Regards

Syed Sharif Ramana Raju SanthanaTevfik TümerMehul  Bhandari

Parents
  • Hi Syed

    As per my understand, you need two things:
    1. Parent Module Record ID and
    2. Subpanel List Record ID
    to do so:
    custom/modules/<subpanel-module-name>/clients/base/views/subpanel-list/subpanel-list.js
    if you dont have file in this respective path, you can copy it from
    modules/<subpanel-module-name>/clients/base/views/subpanel-list/subpanel-list.js
    or
    clients/base/views/subpanel-list/subpanel-list.js

    then on your click event call a function and in that function add following code

    var parentId = this.context.parent.get('model').get("id"); // It will get parent record id
    var subRecordId = this.model.id; // this will give you current record id from your subpanel

    Hope this Helps!!

    Best Regards
    S Ramana Raju

Reply
  • Hi Syed

    As per my understand, you need two things:
    1. Parent Module Record ID and
    2. Subpanel List Record ID
    to do so:
    custom/modules/<subpanel-module-name>/clients/base/views/subpanel-list/subpanel-list.js
    if you dont have file in this respective path, you can copy it from
    modules/<subpanel-module-name>/clients/base/views/subpanel-list/subpanel-list.js
    or
    clients/base/views/subpanel-list/subpanel-list.js

    then on your click event call a function and in that function add following code

    var parentId = this.context.parent.get('model').get("id"); // It will get parent record id
    var subRecordId = this.model.id; // this will give you current record id from your subpanel

    Hope this Helps!!

    Best Regards
    S Ramana Raju

Children