コード例 #1
0
        /// <summary>
        /// Get ExternalReference for Contact/Org
        /// </summary>
        /// <param name="id"></param>
        /// <param name="isContact"></param>
        /// <param name="applicationId"></param>
        /// <returns></returns>
        public long GetContactOrgExternalReference(int id, bool isContact, String applicationId)
        {
            IRightNowConnectService rightNowConnect = RightNowConnectService.GetService();
            String extRef      = rightNowConnect.GetContactOrgExternalReference(id, isContact, applicationId);
            long   externalRef = Convert.ToInt64((String.IsNullOrWhiteSpace(extRef) ? "-1": extRef));

            return(externalRef);
        }
コード例 #2
0
        internal static bool Config()
        {
            lock (_sync)
            {
                if (!_isConfigured)
                {
                    try
                    {
                        // Register config verbs
                        RegisterConfigVerb();

                        // Get right now connect service
                        _rightNowService = RightNowConnectService.GetService();

                        // Initialized Configverbs
                        var isCfgReceived = InitializedConfigVerbs();

                        if (isCfgReceived)
                        {
                            // Parse 'CUSTOM_CFG_Sales_Accel_Integrations' config verb
                            _isConfigured = ParseCustomCfgAccelExtIntegrations();
                            if (!_isConfigured)
                            {
                                LogService.GetLog().Error(ExceptionMessages.CONFIG_VERB_IS_NOT_SET_OR_INCORRECT);
                                MessageBox.Show("_isConfigured is false");
                                MessageBox.Show(ExceptionMessages.CONFIG_VERB_IS_NOT_SET_OR_INCORRECT, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            }
                        }
                    }
                    catch (Exception e)
                    {
                        _isConfigured = false;
                        LogService.GetLog().Error(ExceptionMessages.CONFIGURATION_NOT_INITIALIZED, e.StackTrace);
                        MessageBox.Show(ExceptionMessages.CONFIGURATION_NOT_INITIALIZED, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }

            return(_isConfigured);
        }
コード例 #3
0
        internal static bool Config()
        {
            lock (_sync)
            {
                if (!_isConfigured)
                {
                    try
                    {
                        // Register config verbs
                        RegisterConfigVerb();

                        // Get right now connect service
                        _rightNowService = RightNowConnectService.GetService();

                        // Initialized Configverbs
                        var isCfgReceived = InitializedConfigVerbs();

                        if (isCfgReceived)
                        {
                            // Parse 'CUSTOM_CFG_Sales_Accel_Integrations' config verb
                            _isConfigured = ParseCustomCfgAccelExtIntegrations();
                            if (!_isConfigured)
                            {
                                MessageBox.Show(OSCExceptionMessages.ConfigVerbIsNotSetOrIncorrect, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            }
                        }
                    }
                    catch (Exception e)
                    {
                        _isConfigured = false;
                        MessageBox.Show(OSCExceptionMessages.ConfigurationNotInitialized, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }

            return _isConfigured;
        }
コード例 #4
0
        internal static bool Config()
        {
            lock (_sync)
            {
                if (!_isConfigured)
                {
                    try
                    {
                        // Register config verbs
                        RegisterConfigVerb();

                        // Get right now connect service
                        _rightNowService = RightNowConnectService.GetService();

                        // Initialized Configverbs
                        var isCfgReceived = InitializedConfigVerbs();

                        if (isCfgReceived)
                        {
                            // Parse 'CUSTOM_CFG_Sales_Accel_Integrations' config verb
                            _isConfigured = ParseCustomCfgAccelExtIntegrations();
                            if (!_isConfigured)
                            {
                                MessageBox.Show(OSCExceptionMessages.ConfigVerbIsNotSetOrIncorrect, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            }
                        }
                    }
                    catch (Exception e)
                    {
                        _isConfigured = false;
                        MessageBox.Show(OSCExceptionMessages.ConfigurationNotInitialized, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }

            return(_isConfigured);
        }