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);
            }
        }
Example #2
0
        protected override void Execute(CodeActivityContext codeActivityContext)
        {
            try
            {
                Initialize(codeActivityContext);

                int             of_contact_id = Of_contact_id_InArgument.Get <int>(codeActivityContext);
                of.data.Contact of_contact    = _of_connection.Contact.Get(of_contact_id);

                _tracingService.Trace($"of_id: {of_contact_id}");

                if (of_contact == null)
                {
                    return;
                }

                Maintain maintain = new Maintain(_service, _tracingService, _config, _of_connection);
                maintain.Create_or_update_one_contact_in_crm(of_contact_id, of_contact);
            }
            catch (Exception exception)
            {
                Write_exception(exception);
            }
        }