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
prad_p25prad_p25 

I am trying to show up user last login date in a visualpage but its not showing. Any reason?

I am trying to show up user last login date in a visualpage  but its not showing. Any reason?

Ispita_NavatarIspita_Navatar

Can u please share the code snippet which you are using to show the last login date. Are you using global variable $user?

In case you are using global variable $user then perhaps this information cannot be extracted using $user. May be you try this instead:-

1. Get id of current user from {!$user.Id}

2. Fire a query to query the LastLoginDate of that user and try to print it.

In case you are already doing that then are you rendering the placeholder for lastlogindate correct?

Do share the code snippet to enable me to get a better insight of the issue faced by you.

 

 

 

simsonsimson

hi,

why is it thatwe are able to access some parts of the global variable $user?

It's possible to access !($User.FirstName),($User.LastName)},etc but we cannot access :{!$User.LastLoginDate}.

Is there any specific reason .

Kindly let me know.

Ispita_NavatarIspita_Navatar

Only reason is that salesforce has now exposed that information, and perhaps they would be provided in coming releases.

In case you want this information to be made available post it as an idea on Idea Exchange.