5 Replies Latest reply on Jul 29, 2016 8:47 PM by DavidJondreau

    why this script going into infinite loop?

    tech@phillipit

      Hi,

      I have this very simple script to perform finding records triggered when enter one layout. The script is as followed:

       

      Set Error Capture [ On ]

      Perform Find [ Specified Find Requests: Find Records ; Criteria: PRLine_ITEMS::OrderStatus : “Open” ]

      [ Restore ]

      If [ Get ( LastError ) = 401 ]

      Show Custom Dialog [ Title: "No Open Order Found"; Message: "There are no Orders have not been received yet."; Default

      Button: “OK”, Commit: “Yes” ; Button 2: “Cancel” , Commit: “No” ]

      End If

      Go to Layout [ “Open Purchase Orders” (PurchaseOrder) ]

       

      However when I enter the layout the script just not stop. looks like doing infinite loop?! please help

       

      thanks

      Greg