I have created Inline HTML fields to highlight information sourced from the customer record.
'<div style="border:1px solid #ccc; padding:6px;">' ||
'<div style="font-weight:bold; margin-bottom:4px;">Customer Notes</div>' ||
CASE
WHEN LENGTH({entity.custentity13}) > 0
THEN
'<div style="background-color:yellow; color:black; padding:4px;">'
|| {entity.custentity13} ||
'</div>'
ELSE
'<div>Empty</div>'
END ||
'</div>'
Here in my example, you can see Customer Notes and Delivery Special Instructions are returning Empty once I have selected the customer record.
But after I save the record, then they source the info from the customer record and display correctly.
So, is there a way to source this information during edit?
From what I understand, I can't script Inline HTML fields either.
Ultimately, what I am trying to do is highlight information sourced from the customer record, during edit and view. But Scripting it using
var el = document.getElementById('custbody_special_instructions');
if (el && el.parentElement) {
el.parentElement.parentNode.childNodes[0].childNodes[0].style.background = 'yellow';
el.parentElement.parentNode.childNodes[1].style.background = 'yellow';
}
}
Doesn't save the highlighting, it only shows when editing the record.
And now this Inline HTML field only shows it after saving it and I can't add apparently I can't script an Inline HTML field. So I may have to use a combination of both and use a workflow to set the display status of either field to 'Normal' and 'Hidden' depending on the state of the record? Sounds like a lot of work. 😫