public void ExecuteGetUser(Property[] inputs, RequiredProperties required, Property[] returns, MethodType methodType, ServiceObject serviceObject)
        {
            serviceObject.Properties.InitResultTable();

            Functions.CRMFunctions CRMFunctions = new Functions.CRMFunctions(Utilities.FunctionsUtils.GetCRMConfig(serviceBroker.Service.ServiceConfiguration));

            Functions.CRMUser CRMUserInput  = new Functions.CRMUser();
            Functions.CRMUser CRMUserResult = null;

            try
            {
                CRMUserInput.UserFQN = inputs.Where(p => p.Name.Equals("userfqn", StringComparison.OrdinalIgnoreCase)).First().Value.ToString();

                CRMUserResult = CRMFunctions.CRMGetUser(CRMUserInput);

                if (CRMUserResult != null)
                {
                    returns.Where(p => p.Name.Equals("userfqn")).First().Value        = CRMUserInput.UserFQN;
                    returns.Where(p => p.Name.Equals("userid")).First().Value         = CRMUserResult.UserId;
                    returns.Where(p => p.Name.Equals("responsestatus")).First().Value = ResponseStatus.Success;
                }
                else
                {
                    throw new Exception("CRMUserResult is null.");
                }
            }
            catch (Exception ex)
            {
                returns.Where(p => p.Name.Equals("responsestatus")).First().Value            = ResponseStatus.Error;
                returns.Where(p => p.Name.Equals("responsestatusdescription")).First().Value = ex.Message;
            }

            serviceObject.Properties.BindPropertiesToResultTable();
        }
        public void ExecuteGetUser(Property[] inputs, RequiredProperties required, Property[] returns, MethodType methodType, ServiceObject serviceObject)
        {
            serviceObject.Properties.InitResultTable();

            Functions.CRMFunctions CRMFunctions = new Functions.CRMFunctions(Utilities.FunctionsUtils.GetCRMConfig(serviceBroker.Service.ServiceConfiguration));

            Functions.CRMUser CRMUserInput = new Functions.CRMUser();
            Functions.CRMUser CRMUserResult = null;
            
            try
            {
                CRMUserInput.UserFQN = inputs.Where(p => p.Name.Equals("userfqn", StringComparison.OrdinalIgnoreCase)).First().Value.ToString();

                CRMUserResult = CRMFunctions.CRMGetUser(CRMUserInput);

                if (CRMUserResult != null)
                {
                    returns.Where(p => p.Name.Equals("userfqn")).First().Value = CRMUserInput.UserFQN;
                    returns.Where(p => p.Name.Equals("userid")).First().Value = CRMUserResult.UserId;
                    returns.Where(p => p.Name.Equals("responsestatus")).First().Value = ResponseStatus.Success;
                }
                else
                {
                    throw new Exception("CRMUserResult is null.");
                }

            }
            catch (Exception ex)
            {
                returns.Where(p => p.Name.Equals("responsestatus")).First().Value = ResponseStatus.Error;
                returns.Where(p => p.Name.Equals("responsestatusdescription")).First().Value = ex.Message;
            }
                        
            serviceObject.Properties.BindPropertiesToResultTable();
        }