Hi all, I’m wondering if there is away to programmatically change the color of text in a note field. Here is what I’m trying to do:
– Retrieve data from an external website
– parse the content of the retrieved data and based on certain criteria change the color of text and/or it’s format before adding to a note field.
var url = “somewebsite”;
var data = Utils.getTextFromUrl(url);
data.fontcolor(“red”); // something like this
record.setFieldValue(note_id, data);
form.saveAllChanges();
Any help is appreciated.
Thanks!
Hi Obisbis,
If you switch the Note field to be a Plain Text Note field, then the colour of the font can be set.
var note_field = form.getFieldNamed("My Note");
note_field.valueColour = "#C90000";
form.saveAllChanges();
You can’t adjust individual blocks of text or characters within a Note field using scripts. I haven’t added an API for that.