how to display the value of a reference field using business rule scrpits

Abhinab Achary1
Tera Guru

Hi All,

I am having issue with displaying the reference field value using business rule advanced scripts..

When normal field is taken its displaying OK but when reference fields is taken into consideration its shows SYS_ID

whereas contact is shown as it is .

i tried with getvalue and all dint help attched is the o/p and the code written

Tried both line 29 and 30 not helping.

Please can you guide.

Thanks

Abhinabsample1.JPGsample 2.JPG

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Abhinab,



Append getDisplayValue() to the reference fields i.e glideinc.caller_id.getDisplayValue()


GlideRecord - ServiceNow Wiki


View solution in original post

6 REPLIES 6

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Abhinab,



Append getDisplayValue() to the reference fields i.e glideinc.caller_id.getDisplayValue()


GlideRecord - ServiceNow Wiki


Mihir Mohanta
Kilo Sage

Use


glideinc.caller_id.getDisplayValue()



Thanks,


Mihir


Abhinab Achary1
Tera Guru

it worked , I tried with getValue()



can u please tell me what is differnce between the getDisplayValue() and getValue() function


basically the comparison I want to know   of getDisplayValue() and getValue() and getDisplayBox('caller_id').value.. as i tried for the reference and it appears different function needs for different code.. @Mihir Mohanta @pradeep sharma