Can't create Related Record via BPM for custom entities "Event"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alexisc
    Senior Member
    • Aug 2019
    • 135

    Can't create Related Record via BPM for custom entities "Event"

    Version 7.2.2
    Advanced Pack 2.11.4


    i reproduced it on demo

    1. Create custom entities of type Event
    2. Created Relationships with a lead

    Click image for larger version  Name:	48.31.png Views:	8 Size:	33.6 KB ID:	840323. Created Process Flowcharts​​

    Click image for larger version  Name:	49.34.png Views:	8 Size:	71.6 KB ID:	84033

    Afte​r starting t​he process, the "call" and "meeting" events work fine, but for custom entities "Event", the Relationships does not work.​


    Click image for larger version  Name:	55.14.png Views:	7 Size:	30.1 KB ID:	84034
    Last edited by alexisc; 10-13-2022, 09:38 AM.
  • victor
    Active Community Member
    • Aug 2022
    • 727

    #2
    Hi alexisc

    I tried to reproduce it myself with one difference: instead of the Start Event, I used the Conditional Start Event (it contains the After record updated condition). Everything worked for me the first time.
    Attached Files

    Comment

    • alexisc
      Senior Member
      • Aug 2019
      • 135

      #3
      the problem is not that!
      this works for standard entities: "call", "task" "meeting" but doesn't work for custom entities

      everything worked before, the problem is related to updating to version v7.2.0​

      Related entity is not created, "Parent" field is empty
      Last edited by alexisc; 10-13-2022, 09:18 AM.

      Comment


      • victor
        victor commented
        Editing a comment
        Local - 7.2.4
        Cloud - 7.1.9

        Everything works: during the Lead update, a record is created in the custom entity with type Event.

        Originally posted by alexisc
        everything worked before, the problem is related to updating to version v7.2.0​
        Please try reinstalling the Advanced Pack. I have Advanced Pack 2.11.2 installed on 7.2.4.
        Last edited by victor; 10-13-2022, 09:27 AM.

      • yuri
        yuri commented
        Editing a comment
        It's unlikely that re-installing extensions may change things.

        Any error in log?

      • yuri
        yuri commented
        Editing a comment
        victor Try creating a BPM flowchart with the same starting event.
    • alexisc
      Senior Member
      • Aug 2019
      • 135

      #4
      I do it on DEMO
      EspoCRM Version 7.2.4
      Advanced Pack 2.11.4

      all 3 records are created successfully!

      Create Related Record » Calls
      Create Related Record » Meetings
      Create Related Record » New Events

      but the field "Parent" is empty​​
      Last edited by alexisc; 10-13-2022, 10:03 AM.

      Comment

      • yuri
        Member
        • Mar 2014
        • 8440

        #5
        It's not supposed to be filled according your relationships and BPM action.
        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

        • yuri
          Member
          • Mar 2014
          • 8440

          #6
          As your action creates through the many-to-many relationship rather than parent-to-children.
          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

          • yuri
            Member
            • Mar 2014
            • 8440

            #7
            Please create posts for such issues in the Extensions section. Not in the Bug Reports. Thanks. Bug reports drag me out from development process. Most bug reports are false alarms. They could be handled by our support team rather then developers.
            Last edited by yuri; 10-13-2022, 10:16 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

            • victor
              Active Community Member
              • Aug 2022
              • 727

              #8
              yuri

              Try creating a BPM flowchart with the same starting event.
              In Local 7.2.4 if I use Start Event I get an error.
              Code:
              ERROR: (400) Field validation failure; entityType: BpmnProcess, field: target, type: required.; POST /BpmnProcess; line: 54, file: /var/www/html/espocrm/application/Espo/Core/Exceptions/BadRequest.php [] []
              In Cloud 7.1.9 - everything works.
              Attached Files

              Comment

              • alexisc
                Senior Member
                • Aug 2019
                • 135

                #9
                There are no errors in the logs.
                Everything worked before updating version v7.2.0​
                Now "Create Related Record" - does not work, the new created event is not related to the entity and is not in the entity card.​

                Comment

                • victor
                  Active Community Member
                  • Aug 2022
                  • 727

                  #10
                  Originally posted by alexisc
                  There are no errors in the logs.
                  Everything worked before updating version v7.2.0​
                  Now "Create Related Record" - does not work, the new created event is not related to the entity and is not in the entity card.​
                  alexisc You need to take yuri's advice and change the relationship from many-to-many to parent-to-children (delete your relationship and leave the default one by editing it as in screenshots 1, 2).

                  Just checked, everything works, and in the created by Lead Event in the Parent field, we have a relationship (screenshot 3). It's important that there are no extra relationships except the default one, in which you need to check Lead in Foreign Links (screenshot 2).

                  A many-to-many relationship can have a Link Multiple Field, but no Parent.

                  As for my experiments with different versions of Advaced Pack, the error I described above was solved by replacing Advaced Pack 2.11.2 with Advaced Pack 2.11.4.
                  Attached Files
                  Last edited by victor; 10-13-2022, 01:46 PM.

                  Comment

                  • rabii
                    Active Community Member
                    • Jun 2016
                    • 1250

                    #11
                    Originally posted by alexisc
                    Version 7.2.2
                    Advanced Pack 2.11.4


                    i reproduced it on demo

                    1. Create custom entities of type Event
                    2. Created Relationships with a lead

                    Click image for larger version Name:	48.31.png Views:	8 Size:	33.6 KB ID:	840323. Created Process Flowcharts​​

                    Click image for larger version Name:	49.34.png Views:	8 Size:	71.6 KB ID:	84033

                    Afte​r starting t​he process, the "call" and "meeting" events work fine, but for custom entities "Event", the Relationships does not work.​


                    Click image for larger version Name:	55.14.png Views:	7 Size:	30.1 KB ID:	84034
                    on your new entity event type did you add the lead to the parent field under NewEvenet => fields => parent (add lead to the parent field) ?
                    Rabii
                    Web Dev

                    Comment

                    • alexisc
                      Senior Member
                      • Aug 2019
                      • 135

                      #12
                      @victor Thank you for your attention to my question and the detailed answer, it works, I'm testing further.

                      Last edited by alexisc; 10-17-2022, 08:29 AM.

                      Comment

                      Working...