This topic is locked

Current Record in Field Event (v11)

5/15/2025 6:07:19 AM
PHPRunner General questions
D
druck281 author

In v10.91, I had several field events that used the following to get the contents of the current record to manipulate some things.

$data=$ajax->getCurrentRecord();

In v11 (Build 43339), when I use that same code and examine the contents of the $data array, I see that it is getting the first record in the table, not the current record. I tried this on Edit pages with several different fields in different tables with the same result. When I tried it as a Click Action on a list page, the code works fine. Is there something different in v11 or another way to get the data on the current record?

I suppose I could include the other fields that I need on the form and hide them so that I can still capture them with .getValue() but I would prefer not to rewrite several events if I don't need to.

fhumanes 5/15/2025

Hello,
I identified this same problem from the first versions of version 11.
In my case, it occurs when the List pages has several tabs. In this case, it seems that you do not know how to obtain the record because it confuses the tab that was active.
Greetings,
fernando

Sergey Kornilov admin 5/15/2025

If this is something that might be a bug - make sure you open a support ticket. This is the only way how something can be fixed.

D
druck281 author 5/15/2025

Will do. Wasn't sure if I was missing something or the syntax was maybe a little different in v11.

Thanks!

fhumanes 5/15/2025

Hello,

As I had left this message and the last update had not tried it, I have done the test and ...

My case is already resolved.

I have generated the new project again and this problem at least for my case, already works as it worked in versions 10.x

Greetings,
fernando