3 Replies Latest reply on Apr 11, 2014 2:31 PM by deathrobot

    Trouble finding new record

    deathrobot

      Title

      Trouble finding new record

      Post

           I have a script to create a new record and then find only that new record:

           New Record/Request
           Set Variable [$id; Value:Table::id]
           Perform Find [Restore; Table::id = $id]

           However, the Perform Find always returns no results UNLESS I add a Pause Script for 1 second script step before the Perform Find:

           New Record/Request
           Set Variable [$id; Value:Table::id]
           Pause/Resume Script [Duration (seconds): 1]
           Perform Find [Restore; Table::id = $id]

           Not sure why this should be necessary. Even a pause of .5 seconds doesn't work. BTW, Just in case it's something to do with the rest of the script, here it is in its entirety:
            
           Enter Browse Mode
           If [Get ( Window Name ) = "Quick Lead"]
                Select Window [Name: "Quick Lead"; Current file]
           Else
                New Window [Name: Quick Lead"; Height: 400; Width: 425; Style: Document]
           End If
           Show/Hide Toolbars [Hide]
           Go to Layout ["Quick Lead: Detail" (QuickLeads)]
           New Record/Request
           Set Variable [$id; Value:Table::id]
           Pause/Resume Script [Duration (seconds): 1]
           Perform Find [Restore; Table::id = $id]
           Exit Script []
            
           Thanks,
           Michael