That's what it should do.
What are you trying to accomplish with this script?
Is this a sub summary layout part?
The sub summary part does not refer to any one specific record but rather a group of your records so go to record will not put the focus on it. You may be able to do that with go to field or go to object (Go to object refers using the name box on the inspector's position tab to assign object names to layout objects.)