i tried scripts mentioned on FM forum but they didnt work so far for me.
Was this the script that you tried? Duplicating Bill Of Materials (duplicating portal line items)
If so, in what way did it "not work" for you? (That can then help us suggest an alternative.)
First of all thank you for your reply.
i tried this script but it didnot duplicate portal records at all, infact it start making duplicate entries on previous portal records.
Looking for a solution.
The script in that thread is a script that I designed. If correctly implemented, it duplicates both the current parent record and its set of related portal records. If it is making "duplicate entries on previous portal records" then there is something different in how you attempted to implement the script.
Thank you very much for your support so far.
Just want to ask that while using your scripts, do we need to add any Global field in my ProductionOrder_Lineitems table?
I know very little about the design of your database as you have posted very little info about it here, but I don't see why you would need any global field in order to duplicate a parent record and it's related child records.
Thank you for your support so far.
I have tables and layouts i.e., Batches --- Production Order ----- ProductionOrder Line Items ------ Products.
On my PO layout i have one portal which have PO Line items which fetch data from products. On same production order layout i have batches also which pull data from btaches table also.
Can i also ask you one thing that on your post
you have mentioned RecordNumber, can you please tell me what is this RecordNumber represents in this script.
I am grateful if you help me in solving this problem.
To fill in some details you appear to have:
Production Order ----- <ProductionOrder Line Items> ------ Products
But the relationship to batches are unclear, but it doesn't look to me like it's part of the issue if you are only duplicating records in PO and PO Line Items.
Get ( RecordNumber ) returns the position of a record in its current found set. If you have 5 records in your foundset, Get (recordNumber) returns 1 for the first record, 2 for the second and so on.
If you read and compare the earlies version of the duplicate script with the final version in this thread, you'll find that another person found that if you had a found set of more than one parent record (PO in your case) where the record to be duplicated was not the last record, it failed. And thus, the last version that uses Get ( RecordNumber ) and go to Record/request/Page was needed to get the focus to be on the correct parent record at each point in the script's execution.