Get current user id
Summary: Get current user id to set Suggested Buyer on Non catalog Page
Content (please ensure you mask any confidential information):
I want to set the default value of the "Suggested Buyer" field to the current user when a non-catalog request is created.
I tried setting the default value using Visual Builder Studio's "Express" mode with the expression $user.userId
, but it defaults to 0
instead of the logged-in user's ID.
Now I'm trying to use a "VB Enter" event to call an Action Chain that retrieves the user ID. I'm using cxcode.utils.userInfo
to get the user ID, but it fails with the error: