private ZCRMUserCustomizeInfo GetZCRMUserCustomizeInfo(JObject customizeInfo) { ZCRMUserCustomizeInfo customizeInfoInstance = ZCRMUserCustomizeInfo.GetInstance(); if (customizeInfo["notes_desc"] != null) { customizeInfoInstance.NotesDesc = (string)customizeInfo["notes_desc"]; } if (customizeInfo["show_right_panel"] != null) { customizeInfoInstance.IsToShowRightPanel = (string)customizeInfo["show_right_panel"]; } if (customizeInfo["bc_view"] != null) { customizeInfoInstance.IsBcView = (string)customizeInfo["bc_view"]; } if (customizeInfo["show_home"] != null) { customizeInfoInstance.IsToShowHome = (string)customizeInfo["show_home"]; } if (customizeInfo["show_detail_view"] != null) { customizeInfoInstance.IsToShowDetailView = (string)customizeInfo["show_detail_view"]; } if (customizeInfo["unpin_recent_item"] != null) { customizeInfoInstance.UnpinRecentItem = (string)customizeInfo["unpin_recent_item"]; } return(customizeInfoInstance); }
/** To get All Users */ public void GetAllUsers() { ZCRMRestClient restClient = ZCRMRestClient.GetInstance(); BulkAPIResponse <ZCRMUser> response = restClient.GetOrganizationInstance().GetAllUsers(); List <ZCRMUser> allUsers = response.BulkData; // users - list of ZCRMUser instances foreach (ZCRMUser user in allUsers) { Console.WriteLine(user.Country); ZCRMRole Role = user.Role; if (Role != null) { Console.WriteLine(Role.Id); Console.WriteLine(Role.Name); } if (user.CustomizeInfo != null) { ZCRMUserCustomizeInfo customizeInfo = user.CustomizeInfo; Console.WriteLine(customizeInfo.NotesDesc); Console.WriteLine(customizeInfo.IsToShowRightPanel); Console.WriteLine(customizeInfo.IsBcView); Console.WriteLine(customizeInfo.IsToShowHome); Console.WriteLine(customizeInfo.IsToShowDetailView); Console.WriteLine(customizeInfo.UnpinRecentItem); } Console.WriteLine(user.City); Console.WriteLine(user.Signature); Console.WriteLine(user.NameFormat); Console.WriteLine(user.Language); Console.WriteLine(user.Locale); Console.WriteLine(user.MicrosoftAppUser); Console.WriteLine(user.IsPersonalAccount); Console.WriteLine(user.IsOnline); Console.WriteLine(user.DefaultTabGroup); ZCRMUser ModifiedBy = user.ModifiedBy; if (ModifiedBy != null) { Console.WriteLine(ModifiedBy.Id); Console.WriteLine(ModifiedBy.FullName); } Console.WriteLine(user.Number); Console.WriteLine(user.Street); Console.WriteLine(user.Alias); if (user.Theme != null) { ZCRMUserTheme theme = user.Theme; Console.WriteLine(theme.NormalTabFontColor); Console.WriteLine(theme.NormalTabBackground); Console.WriteLine(theme.SelectedTabFontColor); Console.WriteLine(theme.SelectedTabBackground); Console.WriteLine(theme.New_background); Console.WriteLine(theme.Background); Console.WriteLine(theme.Screen); Console.WriteLine(theme.Type); } Console.WriteLine(user.Id); Console.WriteLine(user.State); Console.WriteLine(user.Fax); Console.WriteLine(user.CountryLocale); Console.WriteLine(user.FirstName); Console.WriteLine(user.EmailId); ZCRMUser ReportingTo = user.ReportingTo; if (ReportingTo != null) { Console.WriteLine(ReportingTo.Id); Console.WriteLine(ReportingTo.FullName); } Console.WriteLine(user.Zip); Console.WriteLine(user.DecimalSeparator); Console.WriteLine(user.CreatedTime); Console.WriteLine(user.ModifiedTime); Console.WriteLine(user.Website); Console.WriteLine(user.TimeFormat); Console.WriteLine(user.OffSet); ZCRMProfile Profile = user.Profile; if (Profile != null) { Console.WriteLine(Profile.Id); Console.WriteLine(Profile.Name); } Console.WriteLine(user.Mobile); Console.WriteLine(user.LastName); Console.WriteLine(user.TimeZone); ZCRMUser CreatedBy = user.CreatedBy; if (CreatedBy != null) { Console.WriteLine(CreatedBy.Id); Console.WriteLine(CreatedBy.FullName); } Console.WriteLine(user.ZuId); Console.WriteLine(user.Confirm); Console.WriteLine(user.FullName); if (user.Territories != null && user.Territories.Count > 0) { foreach (ZCRMTerritory territory in user.Territories) { Console.WriteLine(territory.IsManager); Console.WriteLine(territory.Name); Console.WriteLine(territory.Id); } } Console.WriteLine(user.Phone); Console.WriteLine(user.DateOfBirth); Console.WriteLine(user.DateFormat); Console.WriteLine(user.Status); } }