I would like on the copy action to only copy the header record of an HD structure and not the details. How can I do this?
One way could be using a logic block in the Copy/Recurring Template Actions section in the header application. You could delete all the details. This logic block is run after it copies the HD, but before it saves it to the database.
I have tried that and several other ways and haven’t had any luck. I have two different details tables per header. Since the lb is over the header on the header app, I have to fetch records for each detail table based on nwHeaderId and then I delete the records. Unfortunately, I am still getting the details on my copied version.
Since this is in the header app I can’t save the HD structure after the deletes, so I thought that may be the issue. So I tried puttin the copy logic on the copy action on the HD app and that didn’t work either. I also tried putting a logic block on the detail app but that didn’t work.
So could this be a bug that it’s not deleting the details?
Something along the lines of @kerri.h’s suggestion is the only way I know. There isn’t any way natively supported by the platform.
Is there a way to debug the COPY action?
Not as far as I’m aware.
Thanks for all your help. At this time I will just hide the copy action.
You actually can debug the copy action if logic is configured to run.
I had set up a copy logic block, but the debug drop menu did not show Copy to debug. The only way I figure was to add messages in the copy logic block to display fields.