1 Reply Latest reply on Nov 28, 2013 11:27 AM by Beemer

    Script problem

    Beemer

      Title

      Script problem

      Post

           I am trying to get a script to create new records through a portal.

           I have several records in a found set for which I need the script to go to each portal and create a new record.

           I have set a loop which is set to exit when the number of found records matches the record number, i.e. (I hope) the loop stops when it reaches the last record. This is via two unstored Get calculation fields (RecordNumber and FoundCount)

           All seems to work fine but I am getting a 101 error (missing record) when it comes to moving from the penultimate record to the last record and the script does not update the last record.

           Script:-

           Copy [ Select ; MAILSHOTS::DATECHECK ]
           Loop
           Go to Portal Row [ Last ]
           Paste [ Select ]
           Exit Loop If [ Contacts::Record Number = Contacts::Found Set ]
           Go to Record/Request/Page [ Next ]
           End Loop
           Go to layout [Correspondence]

            

           Can anyone see what I have done wrong?