Hi, Dieter,
Thank you for your support and reply.
I have tried. However, Mailbox.DisplayName is (and other properties are)
read-only. So, am I missing something? Or is there any way to set Mailbox properties editeble?
Regards,
------------------------------
Ali Koyuncu
Asseco SEE Bilisim Teknolojileri A.S.
------------------------------
Original Message:
Sent: 08-27-2020 02:12
From: Dieter Wijnen
Subject: How to Set Time Zone While Creating an Agent?
Hello Ali,
In regards to the display name question: https://help.genesys.com/developer/cic/docs/icelib/webhelp/html/da63481e-473f-a8c6-a5e0-eb9d755d27af.htm
Setting the display name for a UserConfiguration object cannot be done using SetDisplayName(String). The display name for a UserConfiguration object can be set/retrieved from the DisplayName value.
Kind regards,
Dieter
------------------------------
Dieter Wijnen
Telenet BVBA
Original Message:
Sent: 08-24-2020 14:21
From: Ali Koyuncu
Subject: How to Set Time Zone While Creating an Agent?
Hi,
My code to create a new agent is as follows:
public void CreateUser(UserInfo _UserInfo) { ConfigurationManager manager = ConfigurationManager.GetInstance(this.session); UserConfigurationList userConfigurationList = new UserConfigurationList(manager); try { UserConfiguration user = userConfigurationList.CreateObject(); user.PrepareForEdit(); user.SetConfigurationId(_UserInfo.UserId.Trim()); // "$"+ user.SetPassword(_UserInfo.Password, true); user.SetDisplayName($"{_UserInfo.GivenName} {_UserInfo.Surname}"); user.PersonalInformation.GivenName.Value = _UserInfo.GivenName; user.PersonalInformation.Surname.Value = _UserInfo.Surname; if(!String.IsNullOrEmpty(_UserInfo.MailboxAddress)) user.PersonalInformation.EmailAddress.Value = _UserInfo.MailboxAddress; if (!String.IsNullOrEmpty(_UserInfo.Extension)) { user.Extension.Value = _UserInfo.Extension; } if (!String.IsNullOrEmpty(_UserInfo.Workstation)) { user.DefaultWorkstation.Value = new ConfigurationId(_UserInfo.Workstation); } if (_UserInfo.Roles != null) { foreach (string roleId in _UserInfo.Roles) { user.Roles.Value.Add(new ConfigurationId(roleId)); } } if (_UserInfo.Workgroups != null) { foreach (string workgroupId in _UserInfo.Workgroups) { user.Workgroups.Value.Add(new ConfigurationId(workgroupId)); } } user.NtDomainUser.Value = _UserInfo.NTDomainUser; user.License.LicenseAllocationType.Value = ININ.IceLib.Configuration.DataTypes.LicenseAllocationType.Assignable; user.Commit(); } catch (Exception ex) { throw ex; } }
There are three things I couldn't figure out:
1. How to set Default Location or Time Zone
2. Why "Display Name" couldn't be set up.
3. How to set up Mailbox (i.e. user.Mailbox).
Any idea will be deeply appreciated.
Thank you in advance.
Regads...
#ArchitectureandDesign
#AskMeAnything(AMA)
#Implementation
#Integrations
------------------------------
Ali Koyuncu
Asseco SEE Bilisim Teknolojileri A.S.
------------------------------