June 2, 200421 yr Hi I'm trying to create a script that will allow to duplicate a record and it's related records. The problem that I am facing is that when I duplicate the parent record, I need a way to get the related records of the original parent record. The way I was going to go about it is, Duplicate the parent record Store the new duplicated record id into a global (not sure if this is the best way, might be 6 thinking) Go to the related record of the original parent record. Loop through and duplicate the related records and assign the parent id with the value stored in the global. The problem is, when I duplicate the original parent record, I am at the duplicate record and I can't figure out how to go back to the original so I can get the related records. Thanks for any suggestions and any insight on a 7 like approach to this.
June 2, 200421 yr you almost have it - you should actually keep the original record in the global field. then go back to that original record after duplicating it (either by finding the record via the global or a relationship) and continue ( go to related records and duplicate and update the new "key" with the global. good luck
June 2, 200421 yr Author When I store the original id (a auto-enter serial number) in a global field and go to related record, it doesn't go to it. It just stays at the newly created record. Here is again is what I do: I set the original parent ID to global field. then duplicate the original record. then Go To Related Record of the current table and current layout and it never goes to it. The relationship is a global = to the id. I'm having a hard time understanding this Go To Related Record in FM 7. Thanks.
Create an account or sign in to comment