raghav
06/15/2022, 10:34 PMlet 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
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 fieldbattk
06/15/2022, 11:29 PM<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 innerTextraghav
06/16/2022, 1:03 AM