Creating a Clone Page with Selected Field Defaults

  • 1
  • Question
  • Updated 4 years ago
  • (Edited)
Hey all, 

I am trying to create custom clone page for the task object -- the idea is to have a "Create Follow Up" page accessed from an existing task that will have fields pre-populated to save time.  

I have followed the steps to create a custom clone page on an account since similarly the task object has no standard clone action. 

My challenge is, I want to clone the page but also set certain defaults. Example, I want to set the due date to a future date, and set the status to "Not Started" instead of "Completed", and other things that will make sense in the context. 

I have tried doing this following the advice in this forum thread but when I add the condition to pull in values from the ID in the parameter AND add additional conditions to set field defaults, I just get a blank page with no fields as per below. 



If I remove the additional conditions I successfully get my desired page with the identical values to the previous page, and it will save into a new record. 

So the only thing I can't get working is how to add additional conditions to default certain fields to values other than the original record.

As an aside, I actually don't get how these multiple conditions COULD work, since isn't it saying to find tasks that match the original ID and have values different from the original ID, which is impossible? But I'm sure I'm missing something. 

Any help appreciated! 
Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb
Thought this thread may have slipped through the cracks -- grateful for any insights out there. Thanks! 
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Justin;  Sorry for the delay.   Your last comment is actually right on point.  Because the query is trying to load both tasks from the original id as well as those that meet some other critieria - nothing is returned - and you see crickets. 

There is another way to approach this.  Instead of building a clone page.  Build a "new record page"   So create a new task model.  However also create a "Old task model" that is populated via URL parameter with the data from the old task.

Finally in the new task model add conditions of two types.
1. Data from the old task. Using "field from another model" conditions to move all the needed data over from the old task. 
2. Prepopulated data for the new task.  (Status, Future date, etc)  

Make sure your "Create Follow Up" link on the original task includes the URL parameter with it. 

You should be good. 
Photo of Justin Norris

Justin Norris

  • 782 Points 500 badge 2x thumb
Brilliant! Thanks Rob.