4

I need to calculate the LastLoginDate - Created Date of Users in a formula field. The Last Login Date field is not available here.. Is there a way to get it without having to write code/SOQL?

3

2 Answers 2

3

No, unfortunately that is not possible. You will have to resort to code.

1

You can't access the Last Login Date in the formula, but the field is assessible via APEX and Visual Flow.

If you're in the headless Flow pilot - or when it goes GA - you can do this without code. You'll have two options, create the flow which saves the Last Login Date in a custom date field for your formula - or do the calculation directly in the flow and save it.

If you are not in the pilot, you can call the flow via an Apex Trigger. The code is fairly simple and would save you from having to write all the logic in Apex.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .