HowTo: Using the CopyAction for a List

Imagine these use-cases. You want to enter a new Sales Order from the Customer Card. Or you want to add a new Deliverable from the Project Card. Within the Silver Essence Configuration, this is done using CopyActions. But did you know you can use the CopyActions in the LinkedLists as well? No? Here's how!

Let's take a use-case first

Imagine. You configure a Silver Essence Portal for a company that organizes Events. Contactpersons from their Customers can register for such Events. Participants can be registered one at the time. But in some cases you might want to register more than one, maybe even all Contactpersons from a certain Customer. The Customer Card might look like this, with a Single CopyAction on the left to register a single participant:

Configure a List CopyAction

Create a new CopyAction using the Silver Editor and be sure to use the option Copy from a List:

When using this option, you can now select a BusinessEntityList as the source for your CopyAction. That means that for the Transformations you have access to all the Properties of the BusinessEntity associated with that list:

Now because you will create multiple records, the user should only see the fields that will be the same for all records that are created. So for this example we will the OrganizationID and PersonID from the Source and these values will be different for each record created. If you would set these field to optional, the user might get the impression that these fields can or need to be filled manually, which is not the case. Don't worry, if you forget to set these fields to Suppress, any user input will be ignored in favor of the Transformation values you have specified. But even though the data will be created correctly, it might be confusing for the user.

So how about the NavigateURL?

You can specify a NavigateURL for the List CopyAction just like you do with the Single CopyAction. The difference though is that only the NavigateURL from the last created item will be applied.

And the result will look like...

The List CopyAction will show up when the BusinessEntityList is used as a LinkedList. At the top of the list, a button will appear with the name of that CopyAction.

When the user clicks that button, the following screen will appear:

On the left, the LinkedList is shown and using the checkboxes the user can select the Contactpersons that should be registered for a specific Event. On the right, the entry screen for an Event Registration is shown. Minus the fields though that were marked to suppress. The user can fill out that form and click the Add Registrations button. In the background multiple (in this case 4) Event Registrations will be created. Using a different Contactperson for each Event Registration.

So why not one Event Registration with the Quantity 4?

A valid question for this use-case might be: why not use one single Event Registration with the Quantity 4? Well, that would still be an option. But if you do it like that, you would not be able to see which 4 Contactpersons have registered. Also, it would not be possible to Cancel the Registration for one specific Contactperson.

Some other use-cases

You can use the List CopyAction for many use-cases. For example, you can use it to copy all the participants from one event to another event. That might be necessary if the event is canceled and the participants need to be moved to another event. Using the PostMethod from the CopyAction, you could then also Cancel the original (source) registrations.

Or you might need to create Follow-up Actions for a list of Sales Opportunities, add a group of Employees to a Project or link a group of Users to a specific Security Role. Try it and let us know how you might use this!