Workflow - Howto create task from email in a case with case number in task name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leon
    Junior Member
    • May 2019
    • 7

    Workflow - Howto create task from email in a case with case number in task name

    Hi,

    I would like to create a task whenever an email is sent in a case. The task should have the case number in its name, e.g. Task for case 105
    I cannot get this last part to work.

    I've tried to use the formula:

    Code:
    name=string\concatenate('Task for case ', parentId);
    Click image for larger version

Name:	workflow.png
Views:	489
Size:	39.5 KB
ID:	48245

    but this results in the database ID, not the case number:

    Click image for larger version

Name:	result.png
Views:	147
Size:	8.0 KB
ID:	48246



    Any help would be appreciated.

    Leon
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hello,
    try this name = string\concatenate('Task for case ', parentName)

    Comment

    • leon
      Junior Member
      • May 2019
      • 7

      #3
      Hi Maximus,

      Unfortunately this does not seem to work.
      parentName results in nothing being added:

      Click image for larger version

Name:	parentName.png
Views:	159
Size:	6.2 KB
ID:	48711

      parentType does work, it adds Case to it

      Click image for larger version

Name:	parentType.png
Views:	164
Size:	6.6 KB
ID:	48712

      So it seems that only parentType and parentID work.

      Comment

      • Maximus
        Senior Member
        • Nov 2018
        • 2731

        #4
        You can try to write a hook https://www.espocrm.com/documentatio...lopment/hooks/

        Comment

        Working...