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 Sage CRM

    It does not work. I have attached my code below.

    field name(current) = Type

    field id(current) = emp_type

    field name(need to be changed) = Company

    field id(need to be changed) = com_id

    Code :

    if(this.value == 'val1'){
    crm("Company").caption("New_Caption");
    }

    please give your suggestions.

Children