I need that a workflow check if exist a record

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vinybarreto
    Member
    • Feb 2020
    • 30

    I need that a workflow check if exist a record

    I would like that as soon as certain fields within the identity dealt with were filled in, a workflow would create a task with a certain name, but I need that the flow before been executed validate if there is already a task with the same name that case does not exist to execute the flow of work, because today with the lack of this filter every time that the field of the condition receives an update the workflow trigger is triggered again creating the duplicate activity. I need this trigger to be fired only once per registered lead


    the target entity is lead
    the trigger type is after record saved

  • yuri
    Member
    • Mar 2014
    • 8621

    #2
    Use record\exists function in formula condition.



    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

    • vinybarreto
      Member
      • Feb 2020
      • 30

      #3
      How do i do this formula with the conditions that i want? I already tried but doesn't work

      Comment

      • vinybarreto
        Member
        • Feb 2020
        • 30

        #4
        i need that the formula verify if already exists a record in the entity 'task' with the name 'Estudo da empresa' if the task already exist, don't apply the workflow

        Comment

        • vinybarreto
          Member
          • Feb 2020
          • 30

          #5
          the task can have the same name, but it cant be linked to the same lead

          Comment

          • yuri
            Member
            • Mar 2014
            • 8621

            #6

            Code:
            !record\exists('Task', 'name=', 'Estudo da empresa', 'parentId=', id, 'parentType=', 'Lead')
            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

            • vinybarreto
              Member
              • Feb 2020
              • 30

              #7
              Thank you so much, u're amazing, this formula made the magic

              Comment

              Working...