Hooking up a Function to a Button

We have some part numbers that were set up years ago that we need to add Serial Numbers to. Right now they are tracking the serial numbers in a spreadsheet. I am trying to create a serial number tracker using the UD12 table. I have a function that will look up the next unused serial number for the part (all our SN use the same format) and return it. I added a button to my SN entry form to get the next serial number after the part is entered. I’m not sure on how to hook it up correctly. I can click the button and the blue line goes across the top like it’s thinking but nothing is returned, and the function doesn’t show as having run in the system monitor.

Function

On Click event:

Parameters:

Output:

For the method parameters, I would wrap your UD12.Character01 in curly braces.

{UD12.Character01}

You shouldn’t need response parameters. The response should automatically be returned to the actionResult dataview.

So, after your function, add a row-update and row update whatever column you want with the value of "{actionResult.nextSerial}"