Save & New Tasks for related Opportunities on Account Page

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I'm on my Acct Detail page with related Opportunities in a table view. In a row action I'm building a pop up to create a task related to that rows' opportunity. Where I'm getting stuck is how do I build a "Save & New" functionality into the popup to save the current task and create a new row on that same opportunity? I'm running into issues with the Creating New task after saving the original, clearing out the form, then relating the new task back to the row opportunity. Basically, after I save and clear out, I don't have that row action to relate to the opportunity any more!
Photo of Ryan Faust

Ryan Faust

  • 884 Points 500 badge 2x thumb

Posted 2 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Set the Condition on the Task model so that once you save, empty and create new row it will have the Opp for the WhatId already set.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
The original row action is where the condition will be set. The "Save & New" button should not set any whatid condition or value.
Photo of Ryan Faust

Ryan Faust

  • 884 Points 500 badge 2x thumb
Ok...I think we are *almost* there! Made the adjustments, and voila, when I hit save and new I do create a new row in the model and it is related to the correct Opp Id. But here is the problem, when I hit save and new, I want to save & remove the old task and have a blank view for creating a brand new task. How do I go about removing rows from the model but still keeping it linked to the row condition/Id?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
The condition will stay on until you deactivate it. Thus all new tasks in that model will use the Opp Id you provided. So in your "Save & New" should have the following actions:

  1. Save Model
  2. Empty Model
  3. Create New Row w/ default values as necessary. ie. status = in progress.
Photo of Ryan Faust

Ryan Faust

  • 884 Points 500 badge 2x thumb
This is where I'm struggling, as the condition is not sticking after I remove all rows from model.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Hmmm ... it should. skype me pat.vachon.77