コード例 #1
0
 private void Attach_of_contact_if_missing(crm.Abonnement crm_abonnement)
 {
     if (crm_abonnement.Nrq_subscriber != null)
     {
         crm.Contact crm_contact = new crm.Contact(_service, _tracingService);
         crm_contact.Get_by_reference(crm_abonnement.Nrq_subscriber);
         Create_or_update_one_contact_in_of(crm_contact);
     }
 }
コード例 #2
0
        protected crm.Contact Get_crm_contact_from_crm_aftale(crm.Aftale crm_aftale)
        {
            if (crm_aftale.nrq_bidragyder != null)
            {
                crm.Contact crm_contact = new crm.Contact(_service, _tracingService);
                crm_contact.Get_by_reference(crm_aftale.nrq_bidragyder);

                if (crm_contact.CrmEntity != null)
                {
                    return(crm_contact);
                }
            }

            return(null);
        }
コード例 #3
0
        protected override void Execute(CodeActivityContext codeActivityContext)
        {
            try
            {
                Initialize(codeActivityContext);

                EntityReference aftaleEntityReference = ContactEntityReference.Get <EntityReference>(codeActivityContext);

                crm.Contact crm_contact = new crm.Contact(_service, _tracingService);
                crm_contact.Get_by_reference(aftaleEntityReference);

                Maintain maintain = new Maintain(_service, _tracingService, _config, _of_connection);
                maintain.Create_or_update_one_contact_in_of(crm_contact);
            }
            catch (Exception exception)
            {
                Write_exception(exception);
            }
        }