You can do it by calling a microflow, and in the microflow, you can retrieve the desired user role:
[id = '[%UserRole_Administrator%]']
and then pass it to the current user account, and then show the desired page,
Let me know, if you have any issues,
Hope it helps!!
Hi Harsha, your approach is correct to use the Change Object to change the user role;
however, since you want to switch the role from Employee to HR, instead of retrieving the list of User roles (although I am not sure of settings in your Retrieve action), you can choose to retrieve only the HR User role and assign it to the ‘current user’.
Once done, as Rishabh has suggested above, you would need to call the appropriate Page of the HR in the microflow. Please check the below image:
Done in this way but didn’t worked for me.