You're in luck. FM makes what you are wanting to do really easy with basic script steps.
Use the script step "Show Custom Dialogue" to display the dialogue, with buttons, and return the button the user clicked in.
A simple if/else/endif will do the rest for you.
Use an If statement saying:
Get (LastMessageChoice) = 1 (1 is the default button, 2 is for the button next to it and 3 the next one)
Go to layout...
Go to layout...
Thanks for the clarification Ken and Hildy. I apologize but I'm very new to scripts and I'm a little lost.
I've set the script trigger to run 'OnObjectEnter', so I assume it's supposed to run when the button is clicked?
Nothing happens however... what am I missing?
So far I have:
Show Custom Dialog [Message}
If [Get (LastMessageChoice) = 1]
Go to Layout [original layout]
Go to Layout["IT Layout" (IT Layout)]
So, the problem is that this script doesn't do anything when I click on the button (it opens a new record to enter, but no dialog box)
I want the default button to open a "new record" in the original layout, and by pressing button 2, I'd like it to go to a NEW RECORD in the other layout (IT Layout).
Unfortunately things need to be spelled out for me at this point...
OnObjectEnter script triggers don't work by clicking onto something. They work if you tab onto them.
Just attach the script to the button itself. You can make anything a button by clicking on it, going to Format in the menu bar (or right clicking) and selecting "Button setup". Then just attach the script to it.
So it sounds like you need two different buttons with two different scripts. Unless you use one button, and then you can show the custom dialog, and the script will branch in a different direction depending on which choice the user maker.
Thanks Hildy, I've assigned the script to the button and the dialog comes up... do you have a solution for the second part of my problem? I don't think I need two buttons do I?
I simply want to have the default button to stay on the current layout, yet open up a new record.
The second button needs to go to the IT layout, AND open a new record.