Use Skuid to freeze/unfreeze users?

  • 1
  • Question
  • Updated 2 years ago
  • Answered
It would great to be able to use Skuid to freeze/unfreeze users when deploying changesets instead of having to mess with the dataloader.  I created a table on a Skuid page with the UserLogin object for the data model.  For some reason, however, the UserID column is blank.

UserIDs show up fine when using this query in the developer console:

Select Id, UserID, isFrozen from UserLogin


Another example of Salesforce protecting us from ourselves?
Photo of Jared Jones

Jared Jones

  • 2,214 Points 2k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
This is definitely possible, I just tried it myself and it works, I was able to freeze / unfreeze other users using Skuid. (I added a Condition on my UserLogin model to exclude Logins for the running user, though, i.e. to prevent me from freezing myself).

The UserID column is not showing up because of "standard object weirdness" --- the UserId Reference field here doesn't support SOQL queries across it to the User object, so Skuid doesn't have a "Name" to display for the User (since Skuid tries to always show Names instead of Ids when displaying Reference fields). To get the raw UserId field value to show up, Add a Template field to the table, with the contents being {{{UserId}}} (with three braces on either side).
Photo of Jared Jones

Jared Jones

  • 2,214 Points 2k badge 2x thumb
Thanks, Zach.  I appreciate the explanation and the excellent addition of the running user exclusion.  This will be soooo nice to have during our next deployment.