How can I grab the user id from an authenticated u

David:
How can I grab the user id from an authenticated user and send that back to FM to pull related info?


Andrew Dam:
By default, the user’s information is passed into FM in the $$BF_User global variable, you can grab the id from that object.


Andrew Dam:
Actually, that’s only half the story. The id in the $$BF_User is the id of the User in the Helper File.

You can have a field in the User table in your business file to store the Helper File id and find your record that way.


David:
Got it, tysm as always Andrew :slightly_smiling_face:


Adding my solution to the thread.

In BF - onFormRequest - name script
Set Variable [$id; Value: JSONGetElement ( $$BF_User ; “id” )]
Json was then filtered by the set variable.

1 Like