Change Lead "created date" when assign it to user

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • lazovic
    replied
    Hi Riad,

    Please try to use the following formula script:
    Code:
    ifThen(
      entity\isAttributeChanged('assignedUserId') && assignedUserId,
      createdAt = datetime\now()
    );

    Leave a comment:


  • Riad
    commented on 's reply
    ifThen(
    and(
    entity\isAttributeChanged('assignedUserId'),
    assignedUserId
    ),
    createdAt = datetime\now()
    )

    This not work

  • Riad
    commented on 's reply
    Can you type the the correct formula for v. 7 Please. Thank you

  • rabii
    commented on 's reply
    The if(){} has been introduced in version 7.4 so any version below this you should use the old formula ifThen instead. check documentation.

  • Riad
    commented on 's reply
    if(entity\isAttributeChanged('assignedUserId') && assignedUserId) {
    createdAt = datetime\now();
    }
    This formula works well with v. 8 but not work with v. 7 why?

  • rabii
    commented on 's reply
    Not sure it is doable, the reason is more technical. a lead could be followed by different users hence why mass update is not designed for this kidn of task. this might required a custom action

  • Riad
    commented on 's reply
    Thank you so muck Rabii the script formula is working well.
    But about unfollow I want to do it for the users as I an Admin (The admin can make unfollow instead of any user
    * Or when a user (A) is assigned to lead and follow this lead, then if admin unassigned the user (A) form this lead he must be automatically unfollow this lead
    Last edited by Riad; 04-10-2025, 02:37 AM.

  • rabii
    replied
    1- you can use before script formula under Administration > entity manager > lead > formula > before save custom script (use the code below)

    PHP Code:
    if(entity\isAttributeChanged('assignedUserId') && assignedUserId) {
        createdAt = datetime\now();
    } 
    

    This code will update the created at date to now() date once the assigned user is changed and there is an assigned user.

    2- check this out it might help

    Hello, We had a user ask us if we were able to mass unfollow accounts and contacts for them as they don't have the ability to unfollow except one by one. Thank you!

    Leave a comment:


  • Riad
    started a topic Change Lead "created date" when assign it to user

    Change Lead "created date" when assign it to user

    Hello,
    1- I want to Change Lead "created date" when assign it to user. So the created date of the Lead will be the same date of assign.
    2- As Admin with mass update want to make lead unfollow for any user I want. (Can change lead Followers)
    Thank you
    Last edited by Riad; 04-09-2025, 01:41 PM.
Working...