How to use an onChange Script on a Selection list or another field to set a caption of another field?

SOLVED

How can I change the caption of an field in a scree by using onChange of another field or a selection list? I have tried following code but din't work.

if(this.value == 'value1'){
//alert('hahaha');
field_id.Caption = 'value2';
}

Parents Reply
  • 0 in reply to lakwinc
    SUGGESTED

    I made the assumption that you were working with a standard system screen e.g. Opportunity or Company.

    Fields are referenced using their physical names including prefix  e.g. comp_name or oppo_description

    Have you tried playing with the code in the console to check that you can in fact reference the client side API in your screen?

Children