![]() |
Sergey Kornilov admin 10/12/2024 |
First of all, you need to make sure your code doesn't use any undocumented functionality. For instance, we do not have $button->getConnection() kind of function in our APIs. You need to use Database API to execute your queries and this is most likely what breaks. If this still doesn't help, you need to use this guide to figure out what exactly breaks and where: |
J
|
jcy4nez author 10/12/2024 |
hello Sergey, let's start again. based on the example in the documentation. I have started my code.
I'm trying to capture the value of Pedido# in a button click event using the getCurrentRecord() method in the Server event. Here is the code I'm using:
Server: Client After: Unfortunately, getCurrentRecord() doesn't seem to be capturing the value properly, and the Pedido# field is either undefined or empty when I check the console output. I've tried debugging it further using PHP's print_r($record) but haven't had any luck in retrieving the correct value. Do you have any suggestions or insight into why getCurrentRecord() might not be returning the expected field value? I'd be grateful for any guidance. Thank you in advance for your help! |
![]() |
fhumanes 10/13/2024 |
Hi @jcy4nez, I leave you this link where I explain how PHP code (in phprunner) can be purified in a very simple way: https://fhumanes.com/blog/guias-desarrollo/guia-34-metodo-basico-para-depuracion-codigo/ In a transforming version 10.91 to version 11 project, I have a similar problem than you. Greetings, |
![]() |
Sergey Kornilov admin 10/14/2024 |
The latest code does make sense. When you use print_r($record) in the Server event after getting the data record, what exactly does it print? Also, I do not see any buttons on your screenshot. |