alecgregory Posted June 19, 2013 Posted June 19, 2013 I've found an undocumented RecordOpenState (see attachement). The state is 3 and as far as I can tell it means "Record that you just deleted but is still showing on the layout because an OnRecordCommit trigger is stopping it from committing". Â I post it for information and to see if anyone else has ever seen it. There seem to be some specific conditions required to make it happen as I can only make it happen on records created via a certain relationship at the moment. I'll report back if I can find out enough info to report it as a bug. 1
Wim Decorte Posted June 19, 2013 Posted June 19, 2013 Please do report back with more findings. Thanks!
alecgregory Posted June 19, 2013 Author Posted June 19, 2013 OK, to recreate, try this. Create two tables Parent (pk_parent, other_fields) and Child (fk_parent, other_fields) Link Child to parent via pk_parent and fk_parent and allow creation in the parent table Don't check "Delete this record when record is deleted in the other table" Go to the layout based on the child table and add some fields from the parent table. Create a new record in the child table and fill in the parent table fields to force the creation of a new parent Go to the layout based on the parent table and try to delete the parent record. Ideally do this with the script debugger running. In my system, as soon as the delete step completes, Get ( RecordOpenState ) is set to 3 and the record is still visible on the layout The record only disappears when a second delete action occurs or when a commit occurs. Notes: I'm not sure the steps above will reproduce this as I've not had time to try it on a vanilla solution. There could be other factors I haven't considered in my solution that cause it. I noticed this because I am preventing commits until user presses save or cancel. Chances are you wouldn't notice the issue if you weren't catching commits using the OnRecordCommit script trigger that sometimes returns 0. I can't help thinking that this is somehow related to the bug where portal records sometimes don't delete if you try to delete them before committing them, which has existed since at least FM11 as far as I know. Perhaps fixing that will fix this...
Recommended Posts
This topic is 4232 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