21 thoughts on “Auto Freeze Users Account

  1. Thanks a Lot Rakesh for te Detailed Tutorial , We enable community users through our Contact Object is there a way I can get the Freeze Date auto populated from Contact Object , than the users filling it everytime

  2. Can this be used for password reset instead of freeze? I have a requirement to reset the password after a process builder completes a scheduled action of activating a user. Just wanted to know whats the solution and if this might work.

  3. I want to update all Contacts associated to Account when Status updates to Cancelled and want to disable all the community users associated with that Account’s Contacts. How can this be achieved with Process Builders and/or Flows?

    1. Here you got, try this

        Use process builder to Update Account’s Contacts when account status updates to Cancelled.
        Use time-based action to deactivate user, we are using time-based action to avoid MIXED DML operation.

      Good luck

      1. Hey Rakesh,

        Thanks for your prompt response. I did try as per you mentioned. Now it’s allowing me to save the account with the cancelled status without any error after I used the time based action. But it’s not updating anything on the contact and neither deactivating the status nor deactivating the community user associated with the Contact.

        The Process Builder (PB) is on Account: Created or Edited — Recursion checkbox Off.

        The Following Conditions are met
        [Account].ParentId — Isnull — Boolean — False
        [Account].Parent.PersonContactId – Isnull — Boolean — False
        [Account].Parent.Status__c — Equals — Picklist — Cancelled
        [Account].Parent.RecordType.DeveloperName — Equals — String — Business_Account

        Do you want to execute the actions only when specified changes are made to the record? Checked

        Immediate Action
        No criteria—just update the records!
        [Account].Parent Account ID.Contact ID
        Account Status — String — Cancelled

        Time Based — 1 Hour After Last Modified Date
        [Account].Parent Account ID.Contact ID.Users
        Active — Boolean — False
        Also tried
        Is Portal Enabled — False

        NO Paused and Waiting Interviews

        1. I would suggest using Debug log to find the root cause. Also check if, process builder is able to find the user.

  4. Hello Rakesh,

    I achieved it…A big thanks for your support.

    Really i learnt a lot from your blogs.

    I have one more question for you:

    In PB in Scheduled actions if we put record update(if we make PB fired) that will come and wait in “Paused and Waiting interviews”
    Now what i am trying to do is….Even though users having “Manage Force.com Flow” permission …. i don’t want them to delete waiting interviews under ‘Paused and Waiting interviews’


    Is their anyway to track who deleted waiting interviews?

    Thanks in Advance,

  5. yeah! able to get Scheduled jobs option now…

    –Correct me if my way is wrong–

    Created 2 fields( 4 hours and 8 hours) on user object with checkbox data type.
    so if i edit the user record, changed the profile( to system admin), checked the 4 hours(field) and save the record.
    Our aim is to revert back the profile to previous profile after 4 hours.

    I started building Process Builder like below:
    1. Selected USER object
    2. In CRITERIA:
    selected- Conditions are met
    In set conditions :
    Field : 4 hours (field)
    Operator : equals
    Type : Boolean
    Value : True
    Conditions: All conditions are met
    Advanced: Do you want to execute the actions only when specified changes are made to the record? = TRUE

    IN Scheduled Actions:
    I gave 4 hours after “last modified date”

    –>IN Add Action:
    Selected “Update Records”.
    Under RECORD took “user”
    IN criteria for updating records:
    selected “No criteria—just update the records!”

    Under 'Set new field values for the records you update':
          Field: ProfileID
          Type: String 
          Value: (i am hardcoding previous profileID here) This is           not going to help me. It should revert to previous profile dynamically.

    Could you help me to achieve this please!!!

    Thanks Again

      1. Hi Rakesh,

        –> Created new field in User object
        As suggested, i have created a WFR to capture old profileID in new field
        –> And in flow i created a Record update element (i am pulling old profileID value here) and i am calling this flow in Process builder in scheduled actions
        its not working:-(

        I have a doubt:
        Which will execute first :
        Workflow Rule (or) process builder as per salesforce order of execution.

        The link which you shared its not opening, please check.

        and i have a request for you,
        why don’t you make this scenario as your next post ( i believe this typical scenario will meet your standards to post)


  6. Hi Rakesh,

    I am in love with your blog…thanks a lot:-)

    but…by referencing the above article i tried to achieve a new requirement… but i am keep on failing, can you help me on this please!!!

    Business requirement:
    Being an Salesforce Administrator i have to give system admin access to users for 4 hours or 8 hours or 12 hours…and have to revert that access automatically after that (4 hours or 8 hours or 12 hours).

    Could you let me know whether we can achieve this!!!

    Thanks in Advance,

      1. I selected the ‘User’ object in Process Builder

        In ‘Start the process’

        If we select ‘when a record is created or edited’ scheduled action tab is not appearing…(if this is not possible how can we update profile after 4 hours or after 8 hours)

        Its appearing only for
        ‘only when a record is created’

        1. Scheduled actions are only available in two cases.

          On the object node, the process is set to “Start the process only when a record is created.” All criteria will then have the Scheduled Actions option available.


          On the object node, the process is set to “Start the process when a record is created or edited”, AND on the criteria node, the checkbox “Do you want to execute the actions only when specified changes are made to the record?” is checked. Only criteria on which this is checked will have the Scheduled Actions option available.

      2. Hi Rakesh,

        Malware issue in Remedyforce: Everyday 5-6 user’s accounts are getting frozen. Appreciate if we get solution to this ASAP.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.