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
Amruta ChaudharyAmruta Chaudhary 

Can we have an error pop up for User if "User is inactive"?

if the user is inactive and trying to save record that time can pop up one error msg by saying - "Requestor is inactive- please reassign to an active user on the team"
AnkaiahAnkaiah (Salesforce Developers) 
Hi Amruta,

Try with below Validation rule on User object.
AND(NOT(ISNEW()), Isactive=False)
If this helps, Please mark it as best answer.

Thanks!!
Amruta ChaudharyAmruta Chaudhary
could this logic access the Active field from user profile?
AnkaiahAnkaiah (Salesforce Developers) 
The above rule works on User object.

May i know, what is your extact requirement?

Thanks!!
Amruta ChaudharyAmruta Chaudhary
HI Ankaiah , 
Thanks for your fast response ,
Actually in my requirement there is one object name with WORKFLOW .
if the inactive users are going to submit record of worlfow object  that time they should got this error. 
AnkaiahAnkaiah (Salesforce Developers) 
Ok, WORKFLOW object have lookup field to User?
As per my understanding, when user tries to submit the workflow record with inactive user then you souldnt allow them to save the workflow record.. Am i correct?
Amruta ChaudharyAmruta Chaudhary
yeahh Ankaiah, 
we have two lookup field with USER object 
1.Created By
2.Last Modified By
AnkaiahAnkaiah (Salesforce Developers) 
I think you are giving system fields.
Inactive users shouldnt be able login to salesforce.

Can you please check is there any custom lookup fields on workflow object?