You need to sign in to do that
Don't have an account?
Robert Wambold 10
Updating User object when UserLogin.IsFrozen is changed. Is it possible?
Hello all,
Is it possible to update a custom field (User_IsFrozen__c) on the User object when the Freeze / UnFreeze button is clicked?
Originally I was thinking an Apex Trigger or Process Builder could be used however UserLogin will not allow this.
So, what options are possible? Create custom buttons to Update UserLogin.IsFrozen and User.User_IsFrozen__c.
Any suggestions?
Thanks,
Robert
After digging through the Apex Developer’s Guide and experimenting with the execute anonymous element of the developer console it quickly became clear that I couldn’t freeze a user in Apex. Searching the SOAP API Developer’s Guide proved more productive when I came across the UserLogin object and its associated IsFrozen field. While this still means that I couldn’t use Apex, the SOAP API is accessible via the Ajax Toolkit which I can use from a Visualforce page.
It was then short work to create The Freezer - a Visualforce page to output all usernames present in the system and allow them to be frozen/defrosted at the click of a button. The page is shown below:
I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.
Thanks.