3 Replies Latest reply on May 4, 2012 3:45 PM by Stephen Huston

    Unknown error: "?" is modifying these items

    g@briellelevenson

      I have a script that runs in the background every 20 minutes, and it got hung up yesterday with an error message that I've never seen before. Is anyone familiar with this error?

       

      "?" is modifying these items. You cannot use these items until "?" is finished.

       

      This error is similar to the normal error you get when someone's working in a record, but clearly not the exact same:

      "name" is modifying this record. You cannot use this record until "name" is finished. (the usual error I am reminded me of)

       

      The script started working again on its own, but now I'd just like to know if anyone has seen that error before and if there's a way to prevent it from getting stuck again.

       

      Thanks in advance!

      Gabrielle

        • 1. Re: Unknown error: "?" is modifying these items
          Stephen Huston

          Is your script setting more than one value in a record as it loops through records?

          Or is it doing a Replace Field Contents on a found set of Records?

          Or acting on groups of related records?

           

          It sounds like the script is trying to act on more than one value before committing the changes, and the record (or parent record) is locked, so it cannot commit the multiple edits.

          • 2. Re: Unknown error: "?" is modifying these items
            g@briellelevenson

            Hmm, haha all of the above?

             

            It does a loop on a found set where it sets up to 5 fields per record.

            It does several Replace Field Contents on All Records.

            And there's an occasional Replace Field Contents that is for related records.

             

            You must be right about it locking its own record, but it's just strange that this was just a one-time error, and not something that happens when I step through the script on my own.

             

            I'll take a look through though and see if I can add some record commits along the way, just in case.

             

            Thanks!

            • 3. Re: Unknown error: "?" is modifying these items
              Stephen Huston

              Explicit record commits after each edit should solve the problem if it's your routines running into each other.

               

              If this is a server-side script, try breaking the different parts of the edits into different scripts and set them to run on separate schedules that can't collide.