April 27, 200916 yr 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, 200916 yr by Guest
April 27, 200916 yr 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.
April 27, 200916 yr Author What error trapping precautions do you take? Check the parent table? Check the found count? Edited April 27, 200916 yr by Guest
April 27, 200916 yr 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.
Create an account or sign in to comment