Thank you for your post.
I am unable to replicate the issue. This is what I have done:
1. Using FileMaker Pro 14.0.1 under Windows 8.1, I opened the built-in Contacts solution.
2. I created the first script "GRAB LAYOUT NUMBER"
Set Variable [ $$layout ; Value: Get ( LayoutNumber ) ]
Show Custom Dialog [ $$layout ; "TEST" ]
3. I created the second script "GO TO ORIGINAL LAYOUT"
Go to Layout [ $$layout ]
4. From the "Contacts Details" layout, I executed the script "GRAB LAYOUT NUMBER", and a dialog box shows up with "4" as the Title. I clicked OK.
5. I then went to the last layout "Contact Details | Web", executed the script "GO TO ORIGINAL LAYOUT", and I'm back at the "Contacts Details" layout.
Let me know what I'm doing differently than you so I can replicate the issue.
Please see attached file from Contacts template
If you click on the view button in the listview and try return, it won't return.
It will work if you run this in filemaker 13
What is the link for your Contacts template?
Using my example, if I run "GRAB LAYOUT NUMBER" for the Contact Details layout, I get the same "4" window. When I click on the button ContactList, it takes me to the "Contacts" layout. When I execute the "GO TO ORIGINAL LAYOUT" script, I am returned to the "Contacts Details" layout.