2 Replies Latest reply on Dec 27, 2010 8:50 AM by philmodjunk

    Help me add all contacts quickly to email campaign mgmt template

    ManishSehgal

      Title

      Help me add all contacts quickly to email campaign mgmt template

      Post

      Hello all!

      Is there an easy way to add all of my contacts in the database to the email campaign recipient list (using the template that comes with FM)? Right now I have 600+ contacts and I just want them all to get the email, and don't want to have to click each recipient one by one. I looked around at the add script but wasn't clear on how I might write it as a loop to sequentially add each contact. 

      Any help will be appreciated!

      Happy holidays all!

      Manish

        • 1. Re: Help me add all contacts quickly to email campaign mgmt template
          ManishSehgal

          I was able to do it myself right after I posted this....

          Made this script

          Loop

          Copy [ Select; Contacts::k_ID_Contact ]

          Go to Layout [ “CampaignContacts Utility” (CampaignContacts) ]

          New Record/Request

          Paste [ CampaignContacts::kf_ID_Contact ] [ Select ]

          Set Field [ CampaignContacts::k_ID_Campaign; 3 ]

          Go to Layout [ “Record Detail Contacts” (Contacts) ]

          Go to Record/Request/Page

          [ Next; Exit after last ]

          End Loop

          • 2. Re: Help me add all contacts quickly to email campaign mgmt template
            philmodjunk

            You might want to consider two alternate scripts:

            Loop 
                   Set Variable [$ID ; Value:  Contacts::k_ID_Contact ]
                   Go to Layout [ “CampaignContacts Utility” (CampaignContacts) ]
                   New Record/Request 
                   Set Field [ CampaignContacts::kf_ID_Contact ; $ID ]
                   Set Field [ CampaignContacts::k_ID_Campaign; 3 ]
                   Go to Layout [ “Record Detail Contacts” (Contacts) ]
                   Go to Record/Request/Page [ Next; Exit after last ]
            End Loop

            Copy and paste will fail silently if the referenced field isn't on the current layout. That means a future edit of your layout might break this script. It also destroys any data your user may have copied to the clipboard replacing it with your last copied data and this is annoying to your users. Set Variable/Set Field avoids both of these issues.

            Send Mail also has an option to send the same email to "each record in the found set" so you may find you don't need this looping script at all. This should also keep all other recipients out of the To field in the recipient's email and this should then better protect the privacy of your email recipients.