So I am playing around with the following script:
record.setRecordColor(‘#ff0000’);
Based upon given conditions I set the color I want and it works. The problem is when no conditions are met I don’t know how to reset the record back to the default color it is given when it was created. Any ideas how to do this? Also I am unsure how the text color is being set as this function seems to set the background color.
Hi Stephen,
The setRecordColor() function is only for setting the background colour of the record on the records list screen. It’s not for setting the colour of any fields within the record.
I thought maybe just passing in null would let you set the colour back to the default, but that didn’t work. I’ve just added some code to allow you to pass in null into the function and that will work in the next update. For now you’ll just have to use the black/white clear colour button to set the colour back to the default.