Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

CreateTemporaryContactSelection method on SelectionAgent?

Hi,

on the SelectionAgent there is a method called CreateTemporaryContactSelection which returns a SelectionEntity. 

What is the difference, limitations etc by using CreateTemporaryContactSelection instead of CreateDefaultSelectionEntity?

 

RE: CreateTemporaryContactSelection method on SelectionAgent?

You shouldn't need to use CreateTemporaryContactSelection. Besides returning a new selection entity, it cleans up previously stored selection records for a particular table, for example when executing a task to create a selection from a selection, etc.

Best regards.

Af: Tony Yates 27. sep 2018

RE: CreateTemporaryContactSelection method on SelectionAgent?

Ok, thanks. Reason for asking is that I currently use it in a case where I need to bulk-create appointments on many persons. First time around I used a for-loop where I looped over each person, and created a new AppointmentEntity for each one. That didn't scale very well, so I've changed it so that I instead create a temporary selection, add all persons as members, and then use the GenerateFollowUps method on the selection to create the appointments. Speedwise this makes it dramatically faster to create the appointments. The selection is deleted as soon as the appointments have been generated.

When playing around with the SelectionAgent I noticed the CreateTemporaryContactSelection, which sounds like exactly what I needed, and seems to work fine. Just wanted to see if there was any reason I should NOT use it. For now I'll continue using it then.

Frode

Af: Frode Lillerud 27. sep 2018

RE: CreateTemporaryContactSelection method on SelectionAgent?

Not sure if this history is interesting, but the Temp Selections that get automatically deleted in due time were originally born to support Print (Reports) on a Dynamic selection of contacts. The reporter code only supported static selection.
This is decades ago when we only had contact selections..

/conrad

Af: Conrad Weyns 27. sep 2018