Community
Showing results for 
Search instead for 
Do you mean 
Reply

c.Fields.FieldChanged doesn't work on every PC or System

Copper Contributor
Posts: 32
Country: Germany

c.Fields.FieldChanged doesn't work on every PC or System

[ Edited ]

I build a little programm where I use a CurrentContactChanged-Event and within the function that the CurrentContactChanged-Event calls a FieldChanged-Event.

It works fine for me but when i try the code on a different PC (of a colleague) the FieldChanged-Event doesn't fire.

(I use Windows 7, my colleague is using Windows 8) What's happening?

 

The Code :

 

 public void OnLoad(ActApplication ActApplication)
        {
            ActApl = ActApplication;

            ActApl.CurrentContactChanged += new EventHandler(Act_CurrentContactChanged);
      }

 

 void Act_CurrentContactChanged(object sender, EventArgs e)
        {

          try
            {
                Act.Framework.Contacts.Contact c = ActApl.ApplicationState.CurrentContact;

                Active_Contact.A_Contact = c;
                UID_Contact.UID = c.ID.ToString();
 
                c.Fields.FieldChanged += new Act.Framework.MutableEntities.MutableEntity.FieldCollection.FieldChangedHandler(Act_FieldChanged);

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }

 

    void Act_FieldChanged(string fieldName)
        {

               if (fieldName == "TBL_CONTACT.CUST_CHECKBOX1" || fieldName == "TBL_CONTACT.CUST_CHECKBOX2")
            {

 

                .... do somthing....

           }

       }