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
sususudiosususudio 

how do we run code when a user logs in not only from the Home Screen, even when he presses an email link that brings him to the contact record

I am trying to accomplish an outside system to get a notification every time a user logs in the system, right away, I need the user name and IP address immediately after a successful login, by calling a Web service on our end, I want this service to be called even if the user did not land on the home page, like in the case the user receives a link to a contact via email.The user clicks on the link, log in to Salesforce and see the contact, even in this case, I want to run a code that calls a web service , informing the user logged on this moment with this IP
Scott McFarlaneScott McFarlane
Could you use a Login Flow for this?
sususudiosususudio
OK, this might work, two following questions:
 
Can the login flow call an apex class and pass a parameters
Can an apex class call a web service or a https link ? 
Thank you