Announcement

Collapse
No announcement yet.

Add Tasks to Product entity

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

  • Jakub
    replied
    Great, thank you, works perfect.

    Leave a comment:


  • Maximus
    replied
    Tips on your "standard way" request:
    1. Create the file /custom/Espo/Custom/Resources/metadata/clientDefs/Product.json:
    Code:
    {
        "sidePanels": {
            "detail": [
                {
                    "name": "tasks",
                    "label": "Tasks",
                    "view": "crm:views/record/panels/tasks",
                    "aclScope": "Task"
                }
            ]
        }
    }
    2. In the file /custom/Espo/Custom/Resources/metadata/entityDefs/Product.json add a link to the Task:
    Code:
    {
        "fields": {
            //possible custom fields description
        },
        "links": {
            "tasks": {
                "type": "hasChildren",
                "entity": "Task",
                "foreign": "parent",
                "layoutRelationshipsDisabled": true
            }
        }
    }
    3. Administration -> Clear Cache
    4. Reload a web page

    Perhaps you will also need to open Administration -> Entity Manager -> Taks -> Relationship -> Children-to-Parent relationship -> Edit -> add Products to the Parent Entity Types scope/

    Leave a comment:


  • Jakub
    replied
    Ok, that is the answer. The "standard way" is it look like in contact entity. Thank you

    Leave a comment:


  • Maximus
    replied
    Hi Jakub,
    What do you mean under the 'standard way'?

    Anyway, if you want the Task's side panel to look like in the Contact entity, then you need to add it via the code.

    Leave a comment:


  • Jakub
    replied
    Thank you, it is possible, but I would like to know if there is standard way to enable it.

    Leave a comment:


  • DEN
    replied
    Hello,
    I think it is possible to do this by the following workaround:

    Step 1, Create Relationship.
    Administration >Entity Manager >Product>Relationships>Many-to-Many>Tasks, check the box 'Link Multiple Field';
    Step 2, Add this field to the layout.
    Administration >Entity Manager >Product>Layouts> Side Pannel Fields.

    Leave a comment:


  • Jakub
    started a topic Add Tasks to Product entity

    Add Tasks to Product entity

    Is it possible to add Tasks side panel to Product entity?
Working...
X