Javascript functionalities

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • riju
    Member
    • Aug 2017
    • 33

    Javascript functionalities

    How to get number of related entities in account module and their details in js.
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    it depends, what contains your model
    what's view?

    Comment

    • riju
      Member
      • Aug 2017
      • 33

      #3
      I have a account, and it has two product linked with its relationship panel. I want to know the number or details of the products through codeing. What js code i have to write?

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        in which one file? in which on method?

        possible
        Code:
        this.model.get('productsIds').length
        don't know if this relation is loaded. Print this.model in console and check attributes

        Comment

        • riju
          Member
          • Aug 2017
          • 33

          #5
          The file path is - client/src/views/record/detail.js

          this.model.get('productsIds').length -- This code showing error TypeError: this.model.get(...) is undefined
          Last edited by riju; 09-13-2017, 09:47 AM.

          Comment


          • tanya
            tanya commented
            Editing a comment
            do you change this file for the reason, you described above?

          • riju
            riju commented
            Editing a comment
            No. I just want the number of products linked with an account
        Working...