```let subsidiary_select = form.addField({ ...
# suitescript
r
Copy code
let subsidiary_select = form.addField({
            id: 'custpage_subsidiary_select',
            type: serverWidget.FieldType.SELECT,
            label: 'Subsidiary',
            container: 'custpage_primary_information',
        });        

       var note = form.addField({
            id: 'custpage_note',
            type: serverWidget.FieldType.INLINEHTML,
            label: 'Note',
            container: 'custpage_primary_information',
        })
I want to change INLINEHTML based on fieldchange in subsidiary field, How can I do this in client script? The Below code doesn't seem to work
Copy code
var subsidiary_id = scriptContext.currentRecord.getValue({fieldId: 'custpage_subsidiary_select'});
if(subsidiary_id==1) {
    var default_value ='<html><p><font size="2" color="red">hi</p></html>'
    scriptContext.currentRecord.setValue({
        fieldId : 'custpage_note',
        value : default_value
    });  
}
if(subsidiary_id==6) {
    var default_value ='<html><p><font size="2" color="red">hello</p></html>'
    scriptContext.currentRecord.setValue({
        fieldId : 'custpage_note',
        value : default_value
    });
}
Able to set values for text or select fields but not INLINEHTML field
b
set the default value of the inline html to your paragraph element, but give it an id like
Copy code
<p id="battk_was_here" style="font-size:13px;color:red;" />
then use getElementById to get the paragraph element so that you can set its innerText
r
thank you so much.