Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Trigger Workflow on User Disabled

  • 1.  Trigger Workflow on User Disabled

    GOLD CONTRIBUTOR
    Posted 13 days ago
    Does anybody know how trigger a workflow upon a user being disabled?

    Use Case: We have a leads assignment rotation which queries a list of custom lead assignment allocation records to determine which leads can be assigned to which users. When a user's title or status is changed, we'd like to have a workflow automatically check if they are still active, if their title contains "consultant," and deactivate the related lead assignment allocations if appropriate.  Unfortunately, unlike most entities, the trigger for "Status Changes" is disabled on the user entity.  Status is also not listed in the list of fields under the "Record fields change" option.

    User workflow triggers don't allow a workflow to be triggered against a user based on status change.
    Any ideas?

    ...I guess I could have it fire on any modification of the user record (Modified On date), although it's a bit inefficient.. Any better ideas?

    ------------------------------
    Ryan Perry
    Business Systems Analyst
    Auric Solar
    ------------------------------


  • 2.  RE: Trigger Workflow on User Disabled

    Posted 12 days ago
    You would need to use a plugin to perform this function unfortunately. I think with the status change now controlled by licensing, this option has been removed. Some have suggested trying an async workflow, but I don't expect that to work either.
    One option might be to try setting this up as a Flow, I haven't tried it personally but worth a shot to see if you can get the desired result.

    ------------------------------
    James Abraham
    Practice Lead, Dynamics
    Empired
    ------------------------------



  • 3.  RE: Trigger Workflow on User Disabled

    TOP CONTRIBUTOR
    Posted 12 days ago
    Ryan,

    There is a field called isdisabled that you might be able to use to detect status change.  I've never tried using it as a trigger, so I'm not positive.  I use this field as a filter test for views instead of trying to decipher status codes for SystemUser.  Hope this helps.

    Sincerely,
    Glen

    ------------------------------
    Glen Wolinsky
    Lead Applications Developer
    Miller & Martin PLLC
    Chattanooga TN
    ------------------------------



  • 4.  RE: Trigger Workflow on User Disabled

    GOLD CONTRIBUTOR
    Posted 12 days ago
    Hi @Glen Wolinsky and @James Abraham,

    Thank you both for your input.  Given the relatively low frequency of edits to user records, I think we're going to just have it fire on Modified On.  Of course the first step of the workflow will check the isdisabled and title fields. ​​

    ------------------------------
    Ryan Perry
    Business Systems Analyst
    Auric Solar
    ------------------------------