2 Replies Latest reply on Mar 23, 2012 1:02 PM by disabled_JohnWolff

    Duplicate records to different layout

      I haven't figured out a way to do this so I'm looking for some help. What I want to do is have a script run that duplicates the current record in the current layout and send it to another layout. Right now I have layout "Overtime", when someone hits the print button I want a script to run that duplicates this record and sends it to another layout without the users knowledge or access. The problem we're having is people are creating overtime sheets and then deleting them creating an inaccuracy in our OT reporting. This might not even be the best way to accomplish this but I thought this would be pretty simple.

        • 1. Re: Duplicate records to different layout



          This should be easy to  set up and script.  First create the second layout.  This could be just "duplicate layout" and give it a new name.


          In the script,  Have it do the following.


          Duplicate record.  This makes an exact copy of the record.


          The use Go to Related Record and have it use the new layout and check "Show only related records" and "Match current record only"


          This should take care getting the duplicate record on the new layout.


          Ok,  so that out of the way, I'm not sure that this is the best way of doing this.  The duplicate record,  may cause all sorts of new problems since it will be a duplicate, and if the original has not been deleted then you will have two records instead of 0.  I think both results are probably not good.


          Possibly you can set up a custom menu for the users that removes the delete record button and menu item.  You could script a Cancel function that does delete an unwanted record.   Once the sheet is created and accurate, just prevent them from deleting it.




          • 2. Re: Duplicate records to different layout

            Hi Greg,


            Perhaps you can give us some more details as I think the problems you are facing can best be solved by carefully setting up separate Privilege Sets for the different aspects of the process.


            How many different users are involved and what are the steps?

            Who makes the request for Overtime? Is approval in advance needed? Who is recording the actual hours worked? Is it signed off for payment?


            Controlling access to the different parts of each single record through customised privileges that prevent deletion would, as Bruce has already suggested, be a much better process than parking a duplicate record in another table.


            I hope that helps,