function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AshanAshan 

Trigger on user object

Can we make a trigger to run at a user logout,login or session end. Does the user object gets updated in above events.

vishal@forcevishal@force

triggers are only performed on DML operations , ie, the events can be before/after Insert, before/after Update or before/after delete.

What you want is on log-in and log-out of a user, I don't think you can use triggers for these events.

AshanAshan

thanks vishal for the reply.

But there is a field in user object called, LastLoginDate. I think this should be updated in login. But it doesnt come to the trigger.

vishal@forcevishal@force

hmmm, what is your business goal here?