Drew Sanderson Posted April 27, 2009 Posted April 27, 2009 (edited) What steps do you take when scripting a delete record both in general and specifically when doing a go to related record? Edited April 27, 2009 by Guest
mr_vodka Posted April 27, 2009 Posted April 27, 2009 Making sure that you have the record(s) that you definitely want to delete as the found set. You should make sure that you properly error trap, especially when using GTRR as if there are none, you could be deleting out parent records.
Drew Sanderson Posted April 27, 2009 Author Posted April 27, 2009 (edited) What error trapping precautions do you take? Check the parent table? Check the found count? Edited April 27, 2009 by Guest
mr_vodka Posted April 27, 2009 Posted April 27, 2009 First I check to see if there is a related record. If [ IsEmpty ( Child::ChildID ) ] Set Error Capture [On] Go to Related Records [show related only] If [ Get (LastError) ] Show Custom Dialog ["Error"] Else do something End If This is okay if you are using GTRR for the current parent record. However, if you are trying to match on the found set, things are a little different for capturing the error code. If none of the parent records have matching children records, then it should result in a 401 error. If the first parent record does not have related records but some of the other parent records do, then it will result in a 101 error.
Recommended Posts
This topic is 5690 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now