Buttons, methods, and related records

Hi… I’m very new to javascript. I am muddling my way through but have a problem that has me stuck. I’ve placed a button on a form, and attached a method to get another form on action. My problem is that it won’t pull up the related record. The form it is on, and the form it is pulling up does have a relation defined. I’m using the following code in my editor for the method:

forms.relatedForm.controller.loadRecords(relationship_name)

Can anyone tell me what I’m doing wrong?
Thanks

Hi timc,

Looks like you are loading your related records on your form but forgetting to show them!

Either change to

forms.relatedForm.controller.showRecords(relationship_name)

or add

forms.relatedForm.controller.show()