AnsweredAssumed Answered

Script request

Question asked by NetDude on Jan 2, 2013
Latest reply on Jan 2, 2013 by NetDude

Title

Script request

Post

     Folks Im looking at creating a simple script that will do the following:

     When a user presses the New Record button  The new record ID is also populated into a seperate table.

     I started to create a script that looks like this:
     Go to Layout ["PrimaryLayout" (Primary)]
     New Record/Request
     Set Variable [$PrimaryID; Value:Primary::PID]
     Go to Layout ["SecondaryLayout" (Secondary)]
     New Record/Request
     Set Field [Secondary::PrimaryID; $PrimaryID]

     This script technically works when I place a button on the page and set it to run the script. 

     1) I need this scripts to run when the native FM New Record button is pressed.

     2) The script indicates that it needs to Go to Layout "SecondaryLayout" however I do NOT want to go to the page I simply want the record to be added and the focus remains on "PrimaryLayout"

     Any help would help, THANK YOU!!!!

Outcomes