locked
Disable users through workflow RRS feed

  • Question

  • Hello All,

    I want to write job which will trigger every month and disable users.

    I feel recurring workflow will be best option for this. But I am not able to get Change status option for User entity.

    Can anyone suggest on this?

    Tuesday, August 2, 2016 12:51 PM

Answers

  • Greetings again Jayashreee,

    I do not believe that Microsoft supports user deactivation by automatic workflow. Looking through some sites in regards to this, there are additional steps that have to be done when deactivating users.

    • Assigning Owned Records from the users
    • Assigning Tasks from the users
    • etc...

    http://social.technet.microsoft.com/wiki/contents/articles/29628.ms-crm-administration-disable-users-with-best-practices.aspx 

    Ideally, you will want an administrator to perform this action rather then an automatic workflow.

    With all that being said, here are some ideas on how you can approach this to at least stream line the process:

    Another option would be to create a Dashboard for the CRM administrator that shows users that need to be deactivated. This option is what I use in my system, every morning when I fire up my system; my dashboard defines a few actions I need to do for the day.

    Lastly: you can peruse the market place to see if there is a 3rd party solution that handles this, there are a lot of free or at least inexpensive solutions you can install in to CRM.

    There is always the option to code around it (of course this is not supported), however, if you get a managed solution from a third party provider, they will support your updates and customization.

    Regards,

    Thursday, August 4, 2016 4:01 PM
  • Hi Jayashree,

    You could write a windows service for the same and can use this sample :https://msdn.microsoft.com/en-us/library/jj602914.aspx

    Hope it will help you.

    Thanks


    Mahender |Our Blog
    "Make sure to click on 'Vote as Helpful' and 'Mark As Answer', if you get answer of your question

    Friday, August 5, 2016 7:56 AM
    Moderator

All replies

  • Can someone suggest on this? Waiting for reply..
    Tuesday, August 2, 2016 1:46 PM
  • Greetings Jayashree,

    Just a quick note: an average response time on MSDN is approximately 24 hours.

    A few key questions before I can provide a better response:

    • What version of CRM are you using?
    • You want to run a workflow that disables users, what criteria in your system categorizes a user to be disabled? In other words, how does your environment know when a user SHOULD be deactivated?

    Regards,

    Wednesday, August 3, 2016 9:06 PM
  • Thanks for replying, Joseph.

    I am using CRM 2013.

    We have one date field and option field, based on date criteria wanted to disable users. So I was looking for OOB workflow, instead of creating custom workflow activity.

    Thursday, August 4, 2016 12:39 PM
  • Greetings again Jayashreee,

    I do not believe that Microsoft supports user deactivation by automatic workflow. Looking through some sites in regards to this, there are additional steps that have to be done when deactivating users.

    • Assigning Owned Records from the users
    • Assigning Tasks from the users
    • etc...

    http://social.technet.microsoft.com/wiki/contents/articles/29628.ms-crm-administration-disable-users-with-best-practices.aspx 

    Ideally, you will want an administrator to perform this action rather then an automatic workflow.

    With all that being said, here are some ideas on how you can approach this to at least stream line the process:

    Another option would be to create a Dashboard for the CRM administrator that shows users that need to be deactivated. This option is what I use in my system, every morning when I fire up my system; my dashboard defines a few actions I need to do for the day.

    Lastly: you can peruse the market place to see if there is a 3rd party solution that handles this, there are a lot of free or at least inexpensive solutions you can install in to CRM.

    There is always the option to code around it (of course this is not supported), however, if you get a managed solution from a third party provider, they will support your updates and customization.

    Regards,

    Thursday, August 4, 2016 4:01 PM
  • Hi Jayashree,

    You could write a windows service for the same and can use this sample :https://msdn.microsoft.com/en-us/library/jj602914.aspx

    Hope it will help you.

    Thanks


    Mahender |Our Blog
    "Make sure to click on 'Vote as Helpful' and 'Mark As Answer', if you get answer of your question

    Friday, August 5, 2016 7:56 AM
    Moderator
  • My client has suggested to do this with custom workflow activity which will fire monthly. I am going to do in same way. Do you see any issues with this approach?
    Friday, August 5, 2016 12:49 PM
  • Hi,

    You can use workflow as well, as this seems a direct operations without any dependency so it should not consume more resources. 

    Hope it will help.

    Thanks


    Mahender |Our Blog
    "Make sure to click on 'Vote as Helpful' and 'Mark As Answer', if you get answer of your question

    Monday, August 8, 2016 8:43 AM
    Moderator