How to create workflow on Stream update?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • macrotech
    Junior Member
    • Nov 2017
    • 13

    How to create workflow on Stream update?

    Hello, I want to trigger workflow whenever there is updates in stream so how can we do that ? or my requirement is whenever someone updates stream in case i want to trigger workflow
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello
    Create a workflow rule for Note and set In Formula Condition parentType=='Case'

    Comment

    • rodrigocoelho
      Active Community Member
      • Jun 2016
      • 296

      #3
      Originally posted by tanya
      Hello
      Create a workflow rule for Note and set In Formula Condition parentType=='Case'
      Hi tanya , any way to create a Note (Stream) after updating an Opportunity, for example?

      Workflow that create an related Note(Stream).....

      Is it possible?

      Comment

      • chrisjiang
        Member
        • Dec 2018
        • 88

        #4
        Originally posted by rodrigocoelho

        Hi tanya , any way to create a Note (Stream) after updating an Opportunity, for example?

        Workflow that create an related Note(Stream).....

        Is it possible?
        I am also interested in this. Any solutions? Thanks.

        Comment

        • yuri
          Member
          • Mar 2014
          • 8440

          #5
          Yes. It's possible.

          Use action 'Create Record' > Note.

          Then define in formula:

          Code:
          type = 'Post';
          post = "Test message.";
          parentType = 'Opportunity';
          parentId = targetEntity\attribute('id');
          Add action 'Create Record'. Select 'Note' entity type. Add field 'Type' with the value 'Post'. Add field 'Post' with a text. Specify in formula for the action: parentType = 'EntityType'; parentId = targetEntity\attribute('id'); Specify a target entity type instead of 'EntityType' in the formula, e.
          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

          • rodrigocoelho
            Active Community Member
            • Jun 2016
            • 296

            #6
            Originally posted by yurikuzn
            Yes. It's possible.

            Use action 'Create Record' > Note.

            Then define in formula:

            Code:
            type = 'Post';
            post = "Test message.";
            parentType = 'Opportunity';
            parentId = targetEntity\attribute('id');
            https://www.espocrm.com/blog/automat...with-workflow/
            Thank yuri , I have a syntax question:
            When do you really need to use "targetEntity\attribute('id') " in place of a simples "id" field name?

            For example, when I'm doing a workflow for an object type, every fields of that objects are accessible directly by using their names, not??? Why and when do I have to use targetEntity???

            Thanks

            Comment

            • yuri
              Member
              • Mar 2014
              • 8440

              #7
              https://github.com/espocrm/documenta...ula-in-actions

              Because target entity here is Note, not target entity of workflow.
              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

              • rodrigocoelho
                Active Community Member
                • Jun 2016
                • 296

                #8
                I thought that should be inverse. All attributes are from the workflow object, and if you wanna change something on other object, like NOTE, you should use the NOTE.attribute....

                I'm really confused here.

                Comment

                • yuri
                  Member
                  • Mar 2014
                  • 8440

                  #9
                  It's quite logical.

                  Please read the documentation carefully. There is no things like NOTE.attribute.
                  Last edited by yuri; 01-23-2020, 08:29 AM.
                  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

                  • chrisjiang
                    Member
                    • Dec 2018
                    • 88

                    #10
                    Hi, yuri, can you help me achieve the following:

                    I have a "Count" field in Contact. I want it will increase by 1 (+1) when there is | a new Stream(Note) is created to a Contact record.

                    I tried to create a workflow for Note (created) and set action of "update related record", select "Parent" then Contact.Count. But I got error of running the workflow endlessly......

                    Thanks a lot in advance.

                    Comment

                    • Maximus
                      Senior Member
                      • Nov 2018
                      • 2731

                      #11
                      Hello Chris,
                      are you trying to do something like this (see screenshot)?
                      Attached Files
                      Last edited by Maximus; 01-23-2020, 01:55 PM.

                      Comment

                      • rodrigocoelho
                        Active Community Member
                        • Jun 2016
                        • 296

                        #12
                        Originally posted by yurikuzn
                        It's quite logical.

                        Please read the documentation carefully. There is no things like NOTE.attribute.
                        Like here Yuri....

                        Click image for larger version

Name:	Capturar.JPG
Views:	551
Size:	79.2 KB
ID:	55222

                        Comment

                        • yuri
                          Member
                          • Mar 2014
                          • 8440

                          #13
                          NOTE is not a link name. There is no link Note. If you create Note record from the workflows, it doesn't mean that link 'Note' will appear.

                          There is an explanation about naming: https://github.com/espocrm/documenta...tion-arguments

                          There's no need see to discuss this more. It designed the way how it is designed. What's the point of this discussion.
                          Last edited by yuri; 01-23-2020, 02:34 PM.
                          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

                          • rodrigocoelho
                            Active Community Member
                            • Jun 2016
                            • 296

                            #14
                            Originally posted by yurikuzn
                            NOTE is not a link name. There is no link Note. If you create Note record from the workflows, it doesn't mean that link 'Note' will appear.
                            Sorry, I wasn't happy with my example.

                            when should I consider "attributeName "
                            and when should I consider using

                            "entity\attribute(ATTRIBUTE) "

                            Only when creating an Action ?

                            Sorry for taking your time Yuri. I know you are busy preparing to launch the next GREAT version!

                            Comment

                            • chrisjiang
                              Member
                              • Dec 2018
                              • 88

                              #15
                              Originally posted by Maximus
                              Hello Chris,
                              are you trying to do something like this (see screenshot)?
                              Yes that is exactly what I want. Thank you so much for your kind attention.

                              Comment

                              Working...