You need to sign in to do that
Don't have an account?

Can we use userInfo.getUserId() in Apex InvocableMethod to get running userId ?
there is any we can use userInfo.getUserId() in Apex InvocableMethod to get the actually running userId instead of automated process id?
Yes, you can userInfo.getUserId() in Apex InvocableMethod to get running userId.
you can get id or firstName or etc which you want from this line of code :
User usrObj = [select firstname from user where id=:userinfo.getuserid()];
string username = usrObj.firstname;
string userId = usrObj.id;
Or
string userId = userinfo.getuserid();
---------------
If you find your Solution then mark this as the best answer to close this question.
Thank you!
Regards,
Suraj Tripathi