OnRender problem in Servoy 7.1

Hello,

We encounter a problem with the onRender event on Servoy 7.1. There was no problem with exactly the same code in Servoy 6.

function onRender(event) {
	   /** @type {JSRecord<db:/udm/companies>}*/
	   var rec = event.getRecord()
	   
	   if (rec.is_active == 0)
	   {
		   event.getRenderable().fgcolor = '#C0C0C0';
	   }

}

When I make a search on a field which have an event “onRender”, I have this message :

TypeError: Cannot read property “is_active” from

It’s like if the getRecord() method was no more recognized by Servoy.

The interesting thing is that the problem happens only when I press the key “Enter” to run the research.

Thank you in advance for your help.

where is that onrender attach on? on the form? or just on a field itself?

The onRender is on the field itself. The errors occurs when I am in find mode and I fire the reasearch on this field with the key “Enter”.
Thank you.

In findmode there is not really a db record where you can ask that ‘is_active’ from
Because that is a FindState which hold the values a users sets that should be used in a search.

You can make a case for this to check this out.