This topic is locked

Custom Button on masterlist: How to get the value of a certain field to pass it to the server

11/2/2023 6:27:01 AM
PHPRunner General questions
T
thomas.voelker author

i did insert a custom button on a masterlist to be displayed when the master record is opened with the details list.
img alt

img alt

I want to submit the value of a specific field to the backend.
How can this be achieved?
RunnerPage.getAllRecords() is null, rows is null, Runnerpage.getMasterPage() returns null.

All examples use static data.

Do I have to set the value in a beforeopen event?

C
cristi 11/2/2023

I don't understand much from your question but if all that you want is to get a field value and pass it to the server in the custom button server event then it's very simple:
Client before:

var x=Runner.getControl(pageid,'somefieldname');
params["data"] = {
somedata : x.getValue()
};

Server

$data= $params["data"]["somedata"];

That's it.