That basic approach should work. What does the script attached to your button look like?
The problem lies in your script and you use a copy step that is not the best option for this operation also.
After the End IF, put this:
Set variable [$ID ; Value : SerialInformation::SerialID? (Can't see field name behind the portal setup dialog)]
Set variable [$CustID ; Value : Customers::CustomerID ]
Once you use Go To Layout to switch to a different layout, you exit the portal and the serial ID of the current portal row is lost, so you should capture this information before switching layouts.
To pass the Serial ID on as a parameter in the perform Script call at the end of your script, you can now pass $ID as the parameter.
Copy has two major failings when used in a script:
Copy destroys any data the user may have copied to the clipboard
Copy fails silently if the specified field is not present on the current layout--thus future edits of that layout can break your script and you won't get any obvious error messages telling you that this is why your script no longer works.
Thank you so much! That was my problem. I know that copying is a problem. I guess thats what happened when the former database administrator didnt care for user friendlyness.
Thank you again!