Logen Watkins Absent Member.
Absent Member.
93 views

User Object -- Phone Number

Jump to solution
Is it possible to access the information stored within "Set Up Project Users?" I would like to have a field automatically filled with the user's phone number when they create a new defect.

The method I tried was inside of Defects_Bug_New adding a line that said
Bug_Fields.Field("BG_USER_01").Value = User...
but from what I can tell, I can only access FullName, IsInGroup, and UserName.

Any help would be appreciated.
0 Likes
1 Solution

Accepted Solutions
SreeKrishnan Absent Member.
Absent Member.

Re: User Object -- Phone Number

Jump to solution
You may need to use OTA API to get to the user phone number. The below script will get the phone number for the current user

Dim custUsers
Dim custUser
Set Td = TDConnection
set cust = td.Customization
cust.Load

set custUsers = cust.Users
set custUser = custUsers.User(TD.UserName)

Bug_Fields.Field("BG_USER_01").Value = custUser.Phone

Set Td = Nothing

View solution in original post

0 Likes
3 Replies
SreeKrishnan Absent Member.
Absent Member.

Re: User Object -- Phone Number

Jump to solution
You may need to use OTA API to get to the user phone number. The below script will get the phone number for the current user

Dim custUsers
Dim custUser
Set Td = TDConnection
set cust = td.Customization
cust.Load

set custUsers = cust.Users
set custUser = custUsers.User(TD.UserName)

Bug_Fields.Field("BG_USER_01").Value = custUser.Phone

Set Td = Nothing

View solution in original post

0 Likes
Logen Watkins Absent Member.
Absent Member.

Re: User Object -- Phone Number

Jump to solution
Thank you so much, that is exactly what I was looking for!
0 Likes
Highlighted
Logen Watkins Absent Member.
Absent Member.

Re: User Object -- Phone Number

Jump to solution
Problem solved as written above.
Thanks again!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.