auto-populate email address in record producer field

nathantenaglia
Tera Expert

Hi all,

I'm building a record producer to capture a specific incident with one of the fields requiring a contact email address.

In most cases we already have this information available within the Sys_User table which means I should be able to auto-populate the field unless the user wants to change it to an alternative address.

The auto-population is working for me

I've setup the following:

Table: Incident

Type: Reference

Question: Email Address

Type Specifications

- Reference: User (sys_user)

Default value: javascript:gs.getUser().getEmail()

However the form field just loads the getUser detail (full name) rather than the email address.

Can anyone see what I'm doing wrong?

1 ACCEPTED SOLUTION

nathantenaglia
Tera Expert

I've resolved this myself.



Looks like I'm unable to use a "reference" type field, so have updated to "single line text" field which made the above (original post) work immediately.


View solution in original post

4 REPLIES 4

Harsh Vardhan
Giga Patron

Hi Nathan,



Please check the link below.



How can I auto populate user location information in service catalog variable?



Regards,


Harshvardhan


nathantenaglia
Tera Expert

I've resolved this myself.



Looks like I'm unable to use a "reference" type field, so have updated to "single line text" field which made the above (original post) work immediately.


tanumoy
Tera Guru

Make the variable as single line text instead of reference.



It will work.


yeah !! It worked to resolve my issue 

thank you.