Discussions

Expand all | Collapse all

Can you configure the Copy Master/Detail Records button?

  • 1.  Can you configure the Copy Master/Detail Records button?

    Posted 07-20-2018 18:46
    How much flexibility do you have with the Copy Master/Detail Records button? I would like to be able to configure a couple things: 
    • Exclude fields from being copied
    • Edit the values in certain copied fields
    Is this possible? I suppose I might be able to make a custom copy button using the API, but if possible this would be a much better option. 


  • 2.  RE: Can you configure the Copy Master/Detail Records button?

    Posted 07-20-2018 18:50
    All fields are copied.  No choice.  And unless you are some kind of javascript brainiac, there is no way to replicate what it does in terms of copying children and grandchildren.

    So, what I do is to call the COPY button Step 1 of 2.   I then key off the copy of field to detect that this is a copy and contrive the form to force the user to click a 2nd URL formula button which clears fields (including the "Copy of" indicator field and any other edits required.


  • 3.  RE: Can you configure the Copy Master/Detail Records button?

    Posted 07-20-2018 18:54
    I'm not understanding how you're detecting that the copy is a copy. What is the "Copy of" indicator field? How can I set it up? 


  • 4.  RE: Can you configure the Copy Master/Detail Records button?

    Posted 07-20-2018 19:02
    In order to set up a copy master detail you need to select a text data field.  So for example it would be the field like Project Name.  So of the Project Name was called

    "Figure out how to do a custom Copy Master detail"  (no doubt with child task records like RTFM, post to community forum, guess etc, then the clopied Project would be called

    "Copy of Figure out how to do a custom Copy Master detail".

    so I have a formula field like

    Begins([Project name], "Copy Of") and if that is true, I know that the record was just copied.

    As a part of the URL # 2 button I remove the leftmost 8 characters of the Project name to get rid of "Copy Of


  • 5.  RE: Can you configure the Copy Master/Detail Records button?

    Posted 07-20-2018 19:04
    Ah that makes sense, thanks. 


  • 6.  RE: Can you configure the Copy Master/Detail Records button?

    Posted 07-21-2018 00:00
    Mark, is there any way that an automation could handle this? It is not recognizing an "add record" action just took place when the user clicks the Master/Child button, so it seems there is no trigger for me to set up for when to remove one of the copied fields.

    My concern with doing the copied nomenclature and the formula field is that the users will never change the Copy field and the rule will always fire to remove the entry from the specific field because you will not be able to set it for "only when field changes" (because it will be like that from the add).


  • 7.  RE: Can you configure the Copy Master/Detail Records button?

    Posted 07-21-2018 00:47
    Interesting.  I never thought of using an Action or Automation for the Step 2 since they were not available when I started using the technique.  You should be able to use either one and trigger on add record and also the condition that the "Copy Of" field begins with copy of. 

    Are you saying that you tried an Action or an Automation and it did not work.  It seems to me it should work perfectly.


  • 8.  RE: Can you configure the Copy Master/Detail Records button?

    Posted 07-21-2018 01:53
    The automation process actually works* - so this is a great fix for a very old, annoying problem! I did not even need to include the Copy Of field - just set up my automation like this:

    When a user Adds a Record on X table
    Match the Record ID to the Trigger: Record ID
    Update the field you want

    *Sometimes you just need to walk away from the computer! It wasn't working originally because I accidentally typed a word along with the Trigger:Record ID 


  • 9.  RE: Can you configure the Copy Master/Detail Records button?

    Posted 07-21-2018 01:55
    OK, great.  So I learned something too.  But don't you need to filter the automation / action on Copy Of.  What if a user just Adds a record the regular manual Add Record method. 


  • 10.  RE: Can you configure the Copy Master/Detail Records button?

    Posted 07-21-2018 02:11
    Ah yes, it depends on what you what the action to do. I want it to delete a field being copied over, so for me it is just zeroing it out to what it would be on a normal add record.

    To specifically target only the Master/Detail ones you could do that OR even better, you can indicate that the record has children records >0 as additional trigger criteria.