Announcement

Collapse
No announcement yet.

Default Team

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Default Team

    I have a new Entity "TestDB" definied.

    I have a user with a default team and team set as Test-Team.

    If this user create a record in TestDB the Team is not set for this reccord.

    What i have done wrong ?

  • #2
    I have the same thing, on manually created entities - "Event" type, " Team" is not set when creating new
    reproduced on demo, it doesn't work
    Version 7.3.3
    Last edited by alexisc; 03-08-2023, 09:13 AM.

    Comment


    • #3
      for new "Entity", the "Team" is not set by default, please write how to solve this problem

      Comment


      • #4
        Until EspoCRM 7.4 is released, there is a workaround for custom entities in EspoCRM 7.3:

        For User who created a record:
        Code:
        $defaultTeamId = env\userAttribute('defaultTeamId');
        ifThen(
        entity\isNew(),
        entity\addLinkMultipleId('teams', $defaultTeamId)
        );
        For Assigned User:
        Code:
        $defaultTeamId = env\userAttribute('defaultTeamId');
        ifThen(
        entity\isNew(),
        entity\addLinkMultipleId('teams', assignedUser.defaultTeamId)
        );
        ​​
        Code must be inserted into each required custom entity in:Administration -> Entity Manager -> Custom_Entity_Name -> Formula
        Last edited by victor; 03-08-2023, 11:09 AM.

        Comment


        • #5
          > Until EspoCRM 7.4 is released,

          It's not correct.

          EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.


          Click image for larger version

Name:	image.png
Views:	135
Size:	9.7 KB
ID:	88987

          Comment


          • #6
            Thank you! you are best!

            Comment

            Working...
            X