SeedCodeComplete2

Select Contact

SeedCodeComplete2.SelectContact History

Hide minor edits - Show changes to output

Changed lines 3-4 from:
Yes. In addition to the [[UsingTheSelector | generic selector]] that SeedCode Complete provides for you, there is a special selector for selecting contacts. This simple script is like an %newwin% [[http://en.wikipedia.org/wiki/API | API]] that you can employ when you need to select a contact: it will return the selected contact to you in a global field so that you can then use it in your own scripts.
to:
Yes. In addition to the [[UsingTheSelector | generic selector]] that SeedCode Complete provides for you, there is a special selector for selecting contacts. This simple script is like an %newwin% [[http://en.wikipedia.org/wiki/API | API]] that you can employ when you need to select a contact, no matter where you select a contact: it will return the selected contact to you in a global field so that you can then use it in your own scripts.
Changed lines 23-25 from:
-> Restrict the contacts to those from a single company by entering the company name, or part of it, into the field "SelectContact::SelectContactTypeAhead_Company_Glob"

to:
-> Restrict the contacts to those from a single company by entering the company name, or part of it, into the field "SelectContact::SelectContactTypeAhead_Company_Glob" as we do at the beginning of the script "Additional Contact for Project" or by including a CompanyName parameter when calling the script "Select Contact { ContactID...".
Changed lines 29-30 from:
-> Select Company
-> Select Project
to:
-> Select Company { CompanyID ; Multiple Selection }
-> Select Project { ProjectID , MultipleSelection , CompanyName, ContactName , Status }
Changed lines 23-31 from:
-> Restrict the contacts to those from a single company by entering the company name, or part of it, into the field "SelectContact::SelectContactTypeAhead_Company_Glob"
to:
-> Restrict the contacts to those from a single company by entering the company name, or part of it, into the field "SelectContact::SelectContactTypeAhead_Company_Glob"


!! Similar Selectors

The method used in this contact selector is also in use in two other API scripts which work the same way. Feel free to make use of these as you extend SeedCode Complete.

-> Select Company
-> Select Project
Added lines 1-23:
!! Can I employ the Contact Selector in my own scripts?

Yes. In addition to the [[UsingTheSelector | generic selector]] that SeedCode Complete provides for you, there is a special selector for selecting contacts. This simple script is like an %newwin% [[http://en.wikipedia.org/wiki/API | API]] that you can employ when you need to select a contact: it will return the selected contact to you in a global field so that you can then use it in your own scripts.

'''How it works.'''

-> Take a look at the script "Select Contact for Project" to see this in action. The script begins with a couple If() statements to see if we really want to select a contact. But the real work of the script is in just two lines:

-> The step after the comment "Show contact selector" calls our selector script (the one that is like an API). Take a look at the parameters we're passing in: we send the currently selected contact, if any, and that's about it. Pretty simple.

-> Read the comments at the head of the script "Select Contact { ContactID..." to learn about the optional parameters this script accepts, including "MultipleSelection = 1" for selecting more than one contact at a time.

-> The next line in the script (after the comment "Set selected contact into project") sets the results of our selection into the project record: the selected contact is returned in the field "SelectContact::SelectContact_SelectedIDGlob" and you can then make use of it in your own scripts.

'''Some thing to keep in mind.'''

-> If you employ multiple selection, the contact IDs selected will be returned as a carriage return separated list in the field "SelectContact::SelectContact_SelectedIDGlob".

-> If you have large numbers of contacts, edit the script "Select Contact { ContactID..." and switch the variable after the comment "Show all contacts when filters are empty?" to No. This will prevent you from sorting the entire contact list as soon as you arrive.

-> The script "Select Contact - Find Contacts { ShowAll }" actually finds the matching contacts, so if you want to restrict which contacts show up, that's where to do it, though we do provide a mechanism for restricting by company...

-> Restrict the contacts to those from a single company by entering the company name, or part of it, into the field "SelectContact::SelectContactTypeAhead_Company_Glob"
(855) SEEDCODE
[email protected]
Follow us: