public static void OnLoad1Step( IOpportunityContacts form,  EventArgs args)
 {
     IOpportunity opportunity = form.CurrentEntity as IOpportunity;
     if(opportunity.Account == null)
     {
       form.lueAssociateContact.Enabled = false;
     }
     else
     {
       form.lueAssociateContact.Enabled = true;
     }
 }
 /// <summary>
 /// Adds the selected contact as a new opportunity contact.
 /// </summary>
 /// <param name="form">The opportunity contacts form.</param>
 /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 public static void SetDefaultOppContactInfo(IOpportunityContacts form,  EventArgs args)
 {
     Sage.Platform.WebPortal.SmartParts.WebActionEventArgs e = args as Sage.Platform.WebPortal.SmartParts.WebActionEventArgs;
     if (e != null)
     {
         IContact contact = form.lueAssociateContact.LookupResultValue as IContact;
         IOpportunityContact opportunityContact = e.PassThroughObject as IOpportunityContact;
         if (opportunityContact != null && contact != null)
                 opportunityContact.SetOppContactDefaults(contact);
     }
     form.lueAssociateContact.LookupResultValue = null; //34026
 }
예제 #3
0
        public static void OnLoad1Step(IOpportunityContacts form, EventArgs args)
        {
            IOpportunity opportunity = form.CurrentEntity as IOpportunity;

            if (opportunity.Account == null)
            {
                form.lueAssociateContact.Enabled = false;
            }
            else
            {
                form.lueAssociateContact.Enabled = true;
            }
        }
예제 #4
0
 /// <summary>
 /// Adds the selected contact as a new opportunity contact.
 /// </summary>
 /// <param name="form">The opportunity contacts form.</param>
 /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 public static void SetDefaultOppContactInfo(IOpportunityContacts form, EventArgs args)
 {
     Sage.Platform.WebPortal.SmartParts.WebActionEventArgs e = args as Sage.Platform.WebPortal.SmartParts.WebActionEventArgs;
     if (e != null)
     {
         IContact            contact            = form.lueAssociateContact.LookupResultValue as IContact;
         IOpportunityContact opportunityContact = e.PassThroughObject as IOpportunityContact;
         if (opportunityContact != null && contact != null)
         {
             opportunityContact.SetOppContactDefaults(contact);
         }
     }
     form.lueAssociateContact.LookupResultValue = null;             //34026
 }