Can you create child records with table mass actions?

  • 1
  • Question
  • Updated 5 years ago
  • Answered
  • (Edited)
I am thinking about having a table of contacts, being able to check a box next to appropriate rows and create activity records for each of those rows.

Having the same values for each of these activities (beyond WhatID referring to parent contact) is perfectly OK in this example.

I imagine there is a moderate amount of JS needed, just curious if someone has tackled this.

Jacob
Photo of Jacob Flatter

Jacob Flatter

  • 338 Points 250 badge 2x thumb

Posted 5 years ago

  • 1
Photo of JD Bell

JD Bell, Senior Product Engineer

  • 2,996 Points 2k badge 2x thumb
Hello Jacob,

Thanks for reaching out to the Skuid community.

You absolutely can create child records using a custom mass action snippet!

An example of creating lookup references can be seen on this question from a couple days ago, but the logic would be very similar (if not the same) for a Master-Detail records:

Create records in a table based on selected records in another table

If you need any help adapting that example for your use, please feel free to reply to this thread and we'll see what we can do for you.
(Edited)
Photo of Jacob Flatter

Jacob Flatter

  • 338 Points 250 badge 2x thumb
Cool, I will take a look!
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Hi Jacob, here is the XML for a sample page that lets you Mass-Create Tasks for selected Contacts, with the added benefit of letting you prepopulate certain fields via the use of a "Prototype" Task Model to which you can add any fields you'd like, and the JS Snippet will pick up on the field values your users would like to prepopulate and add them to the new Tasks:

Gist: MassCreateActivitiesForContacts

Here is a screenshot of what this looks like:






Photo of Jacob Flatter

Jacob Flatter

  • 338 Points 250 badge 2x thumb
This is GRRRREAT!

Now I have to figure out a Subquery to filter contacts by ContactTag!

Jacob