this.dropdownitemlist.push, want direct user to another entity

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • elbowprogrammer
    Member
    • Jan 2016
    • 58

    this.dropdownitemlist.push, want direct user to another entity

    PHP Code:
      if(this.getAcl().checkModel(this.model,'edit')){
      this.dropDownItemList({
       label: 'Receive Payment',    name: 'receivePayment',   link: '#Bill/create'
    });
    } 
    
    In directory, Advanced: Views.Quote.Record.Detail, I add the code above. I want to redirect user to the link I pushed on the dropdownitemlist, but that doesn't work. Am I doing it correctly? If not, what is the correct way
  • yuri
    Member
    • Mar 2014
    • 8467

    #2
    You should do it before view is rendered. In setup method.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • elbowprogrammer
      Member
      • Jan 2016
      • 58

      #3
      I got it work. I enabled a relationship in admin > layout manager > quote > relationships. Then in my custom js file, I customize the setup function. I inherited the setup function, then check if mode is edit, check if the quote id is not 0,null, or false, then used getmodelfactory to set the values.

      Comment

      Working...