cancel
Showing results for 
Search instead for 
Did you mean: 

get display name from extension field with value list

tom_seminckx
Employee
Employee
0 Kudos

All,

I am trying to get the display name from a value list value that is linked to an extension field.

But with the following code, I keep getting the display name ID instead of the displayName.

evalTypeObj = Rfx.getExtensionField("custom_Eval_Type").get();

vlvHome= IBeanHomeLocator.lookup(session, evalTypeObj);

vlv1 = vlvHome.find(evalTypeObj);

evalType = vlv1.getLocalizedObjectReference().getDisplayName();

any idea what I am doing wrong?

Regards,

Tom

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Tom,

try

evalType = vlv1.getLocalizedObjectReference().getDisplayName(session);

I am not sure why you are using a round about to get the display name.

evalTypeObj = Rfx.getExtensionField("custom_Eval_Type").get();

evalTypeObj.getDisplayName();

This itself should get the display name.

Hope this helps.

Regards

Immanuel

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Tom -

I agree with Immanuel that you can simply change the last line of your code to include session in the call to getDisplayName() as here:


evalTypeObj = Rfx.getExtensionField("custom_Eval_Type").get();
vlvHome= IBeanHomeLocator.lookup(session, evalTypeObj);
vlv1 = vlvHome.find(evalTypeObj);
evalType = vlv1.getLocalizedObjectReference().getDisplayName(session);

An even simpler solution, however, would be to do this:


evalTypeObj.getDisplayName(session);

Hope this helps.

Rob