Active user to be passed via Program links

This forum is for programmers who have questions about the source code.
Post Reply
yash1946
Posts: 3
Joined: Thu Dec 30, 2021 10:40 am

Active user to be passed via Program links

Post by yash1946 » Thu Dec 30, 2021 10:47 am

Guys I am working on a small project where I need to know who is the logged in user in open dental. I checked the program link documentation & did not see a user variable. Please guide me how a user can be passed via program link.

User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

Re: Active user to be passed via Program links

Post by dcrider » Thu Dec 30, 2021 2:10 pm

Depends on the hook you're trying to use, but typically one of the parameters passed in is CurPat. If it's not you can usually get it from the static call to FormOpenDental.CurPatNum

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Active user to be passed via Program links

Post by joes » Fri Dec 31, 2021 9:05 am

If this is for the optional command line arguments of a Program Link, [UserName] will pass the username of the user currently logged in to Open Dental. If you are developing a plugin, you can also access the currently logged in user via OpenDentBusiness.Security.CurUser.
Joe Sullivan
Open Dental Software
http://www.opendental.com

yash1946
Posts: 3
Joined: Thu Dec 30, 2021 10:40 am

Re: Active user to be passed via Program links

Post by yash1946 » Fri Dec 31, 2021 12:53 pm

Thanks for [UserName] suggestion, but when I tried with (somePrefix_[patNum]_[provNum]_[UserName] ) only [UserName] did not work, so can you help me with other suggestion.

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Active user to be passed via Program links

Post by joes » Mon Jan 03, 2022 10:47 am

Sorry, I did not verify when [UserName] was added as a command line argument option. It is only in beta (21.4).
Joe Sullivan
Open Dental Software
http://www.opendental.com

yash1946
Posts: 3
Joined: Thu Dec 30, 2021 10:40 am

Re: Active user to be passed via Program links

Post by yash1946 » Tue Jan 04, 2022 11:30 am

Thanks for letting me know about this change, what other user details than [UserName], added in the 21.4(beta). Can you help me with link or details to look for the updated ones.

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Active user to be passed via Program links

Post by joes » Tue Jan 04, 2022 1:36 pm

[UserName] was the only one added in 21.4. All other command line argument replacement options can be found here: https://www.opendental.com/manual/progr ... tfile.html
Joe Sullivan
Open Dental Software
http://www.opendental.com

Post Reply