AnsweredAssumed Answered

Go to field

Question asked by dzittin on Feb 23, 2012
Latest reply on Feb 23, 2012 by philmodjunk


Go to field & go to object troubles


I have a requirement where a user supplies a record ID, it's not auto-generated. Obviously the id needs to be checked to make sure there are no duplicates and for other attributes before it's allowed into the database where it will be used in various joins.

I have a layout with several fields in which data is to be entered. The ID field is one of these. I have a trigger on this field (OnObjectSave) to check qualities of the ID.

The psuedo code for the trigger is:

     booleanreturn = checkid($userID)  /* Checkid returns True if ID is valid, false if not */

     if (booleanreturn = false) /* the id is bad */

         dialog: can't accept this ID, try again....

         go to object("The ID Field")   /* I named the field "The ID Field")

     end if

When I step through the script and get to the go to object statement the cursor is repositioned on the ID field. As soon as the script exits, the cursor changes position to whatever field it was at last after a change was made to the ID and another field is referenced. I tried go to object in desparation because the go to field[fieldname] did the same thing.

How do I get the cursor to reposition on the ID field???????