Own extension and want an own group and 'sub' entities in the tabList

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ednt
    Member
    • May 2022
    • 58

    #1

    Own extension and want an own group and 'sub' entities in the tabList

    Hi,

    I create an own extension with many entities.
    I want to 'bundle' the entries in the navbar with an own group and the entities inside of the group.
    In the AfterInstall script I found only a way to add the entities, but not below an own goup.
    And then I need also AfterUninstall to remove them.

    Isn't there a json file possibility to do this?

    Or how can I do it in general?

    Best regards.
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9606

    #2
    I suggest the following approach.

    Add a group tab under the Administration > User Interface. Check data/config.php -> tabList. Then, replicate it in the AfterInstall script. Use Config and ConfigWriter to read and wring config parameters.

    Comment

    • Ednt
      Member
      • May 2022
      • 58

      #3
      We did it just now, but ...
      All (objects) in the tabList have an id. How can we generate a valid id for the new group?

      Comment

      • yuri
        EspoCRM product developer
        • Mar 2014
        • 9606

        #4
        Just a random string.

        PHP Code:
        $id = (string) rand(100000999999); 

        Comment

        Working...