1-click Create Note from an Activity Comments

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
Hey Skuid Community! I've got a good one here and brainstorming the best ways to achieve this, ideally with as little (or no) code as possible.

I'm building a page for a sales acquisition team. They mainly work with activities - logging their contact type (call, email), etc., while putting in the comments/description of what that contact detail was. The problem is that when the customer moves into my retention side, they use and operate solely in notes. Now, I don't want to have the acquisition team log a note for every attempt/contact, b/c many of the activity descriptions are pretty useless down the road.

So here is my attempt - I want to add a button that will allow the consultant to click it and automagically create a note with the text of the activity description. This way, when the acquisition team deems the content important enough, they can create the note without any duplicate entrys, copy/paste, etc.

Any thoughts on how to achieve this in the Skuid framework?

Any and all suggestions welcome!
Photo of Ryan Faust

Ryan Faust

  • 884 Points 500 badge 2x thumb

Posted 2 years ago

  • 1
Photo of David Forder

David Forder

  • 2,144 Points 2k badge 2x thumb
From the description you gave it is fairly simple. Add a model for each type, when your guys create an activity use a custom save button, save the activity and then also have the button add a row to the note model and on the same action update the note fields with whichever activity field you want copied over.
Photo of Ryan Faust

Ryan Faust

  • 884 Points 500 badge 2x thumb
Thanks David. Where I am stumped is how do I take the text out of the Activity Comment and use that text to populate the Note Body. Also - how do I ensure that the new note is related to the correct Parent Id for the Note?
(Edited)
Photo of David Forder

David Forder

  • 2,144 Points 2k badge 2x thumb
By Activity I assume your team is using Tasks? 

Even if not and they are using a custom object called Activity  the attached screen grab should point you in the right direction.



On the save button, use multiple action, select save your Activity, then add a new action for create new row on the Note model. You will see a small plus sign on this action.. it lets you fill in field details.

By using 

{{$Model.Activity.data.0.Details}}

as the entry for the Body field on Note it will insert the details field from Activity.

(note : this command is case sensitive .. eg {{$Model.activity.data.0.details}} for example .. wont work.)

By using this you can work your way inserting whatever fields you want on Note and then add a last action to save the record.

Hope this helps.

David
Photo of Ryan Faust

Ryan Faust

  • 884 Points 500 badge 2x thumb
Awesome. Freaking awesome. Working like a charm! And, I'm not a programmer, but - I completely understand the logic that you shared. It's working and I've already expanded it. Thank you!
Photo of David Forder

David Forder

  • 2,144 Points 2k badge 2x thumb
Great .. glad I could help