Business Rule on User deactivation to remove associated role - not working and opens welcome.do

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â08-12-2023 08:53 AM
I created a new Business Rule on User deactivation to remove all of user's roles. But after deactivating role it now opens welcome.do page and the roles are not getting removed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â08-12-2023 08:56 AM
@Kartik Gopal Could you please post the snapshot of the BR configuration along with the script you are using inside the business rule.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â08-14-2023 09:58 AM
I had an non-existent value for role in my business rule when deactivation, hence the code was not working.
Not sure why it was going to welcome.do page, maybe because of this redirect line.
gs.setRedirect(getLink("true"));
I changed it to gs.setRedirect(current); and now it is working fine.