Announcement

Collapse
No announcement yet.

Formula not working on mass update

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

  • Formula not working on mass update

    I have a case which is failing to work when mass update is used.

    Prep-work:
    1. Create One-to-One Left relationship with User on Lead entity, set the name assignedBy for the User part.
    2. Add this to Formula of the Lead entity:
    Code:
    ifThen(
    entity\isAttributeChanged('assignedUserId'),
    /* other code that works */; entity\setAttribute('assignedById', entity\attribute('modifiedById'))
    );
    3. Add the Assigned By field to the Lead details or list Layout so you can see the contents of the field visually.

    Test:
    Select multiple leads on the list and then go to Actions -> Mass Update select Assigned User and choose a user you like and then hit Update.

    It fails to update the Assigned By field this way (with Mass Update selecting multiple leads).

    It works for single leads, either selecting single lead and then Mass Update, or going to a specific lead and changing the Assigned User.

    Am I doing something wrong or is this a bug?


  • #2
    Hi there,
    Please describe what is the field 'assigned By' (its type, etc.) so we can reproduce it and investigate the issue. What EspoCRM version do you use?

    Comment


    • #3
      happened with me too, any update...?
      Last edited by smithclarkson02; 08-30-2020, 12:34 AM.

      Comment


      • #4
        Originally posted by Maximus View Post
        Hi there,
        Please describe what is the field 'assigned By' (its type, etc.) so we can reproduce it and investigate the issue. What EspoCRM version do you use?
        "Assigned By" is the field created by the relationship on step 1 of the Prep-work I have mentioned above. it's a Link One (User) field basically.

        I am on version 5.9.3.

        You just need to follow the Prep-work steps I have mentioned in the first post to get the environment ready for testing.

        Comment


        • #5
          Hi all, any update/input on this issue?

          Comment


          • #6
            Hi shef,
            I apologize for the delayed reply.

            I've tested it and it works like a charm. I think that you don't have such an attribute as 'assignedById'. I believe you set the 'assignedBy' name for lable, but your real attribute key is 'userId'.
            Please Investigate my screenshot.
            Also you can define more easier Formula code instead of entity\setAttribute('assignedById', entity\attribute('modifiedById')):
            Code:
            userId = modifiedById
            Attached Files

            Comment

            Working...
            X