/// <summary>
        /// Sets the flag, LostReplaced, on the opportunity competitor indicating that this opportunity
        /// competitor was associated as a competitor lost to.
        /// </summary>
        /// <param name="form">The opportunity closed lost form.</param>
        /// <param name="args">The event arguments.<see cref="System.EventArgs"/> instance containing the event data.</param>
        public static void lueCompetitorLoss_OnChange(IOpportunityClosedLost form, EventArgs args)
        {
            ICompetitor competitor = form.lueCompetitorLoss.LookupResultValue as ICompetitor;

            if (competitor != null)
            {
                IOpportunity opportunity = form.CurrentEntity as IOpportunity;
                opportunity.SetOppCompetitorReplacedFlag(competitor);
            }

            IPanelRefreshService panelRefresh = form.Services.Get <IPanelRefreshService>();

            if (panelRefresh != null)
            {
                panelRefresh.RefreshMainWorkspace();
            }
        }
    /// <summary>
    /// Handles the OnClick event of the cmdExternalList control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void cmdExternalList_OnClick(object sender, EventArgs e)
    {
        ICampaign campaign = GetParentEntity() as ICampaign;

        if (campaign != null)
        {
            if (txtConfirmExternalList.Value.Equals("T"))
            {
                campaign.UseExternalList = true;
                Rules.DeleteCampaignTargets(campaign);
                IPanelRefreshService refresher = PageWorkItem.Services.Get <IPanelRefreshService>();
                refresher.RefreshMainWorkspace();
            }
            else //still need to post changes to 'External List' properties
            {
                campaign.UseExternalList           = false;
                campaign.TargetAudienceList        = null;
                campaign.TargetAudienceLocation    = null;
                campaign.TargetAudienceTargetCount = null;
                campaign.Save();
            }
        }
    }