How to listenTo beforeRelate

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Firyo
    Senior Member
    • Jun 2022
    • 134

    #16
    I mean it after the user clicked on "Select" and before the request is sent to the server.

    Click image for larger version

Name:	image.png
Views:	247
Size:	170.9 KB
ID:	93883

    Comment

    • Firyo
      Senior Member
      • Jun 2022
      • 134

      #17
      So, I managed to get it done working.
      • I created a new JS view that inherits 'views/modals/select-records'
      • Added in my "contact" clientDefs "modalViews" > "select' my custom view name
      • The problem was that I also needed the id of the "account" is this case in my modal. After searching for a while and found nothing to get the caller/parent id nor scope I added 2 new parameters in my "src/views/detail.js" in the "this.createView('dialogSelectRelated'" which are "parentId" and "parentScope".
      • Now I'm able to do what I wanted.

      Comment

      • rabii
        Active Community Member
        • Jun 2016
        • 1250

        #18
        it will be great if you could share your code with other users on the developer section. i am sure it will help someone some day. of course if you want to
        Rabii
        Web Dev

        Comment

        • Firyo
          Senior Member
          • Jun 2022
          • 134

          #19
          Originally posted by rabii
          it will be great if you could share your code with other users on the developer section. i am sure it will help someone some day. of course if you want to
          It's not that I don't want to do it.
          The fact that it's a professional project, not a personal one, means I'd rather not share the code.

          Comment

          • rabii
            Active Community Member
            • Jun 2016
            • 1250

            #20
            no worries i understand, i will share how it could be done from my end using a different entities.
            Rabii
            Web Dev

            Comment

            • bandtank
              Active Community Member
              • Mar 2017
              • 379

              #21
              Originally posted by Firyo

              It's not that I don't want to do it.
              The fact that it's a professional project, not a personal one, means I'd rather not share the code.
              It's unfortunate that you couldn't post something as simple as pseudo-code after getting a lot of free help for your professional project. This community doesn't exist without contributions from everyone.

              Comment

            Working...