Show / Hide Table of Contents

Class LiteralsOnlyBase

Base class for making So List providers that represent one single, hard-coded list, i.e., a list where all the items are hard coded and known at compile or run time. Generally, items do not come from the database, though that would always be possible. See the AddItems() method for an example subclass implementation.

Inheritance
Object
LiteralsOnlyBase
OperatorProvider
RecordTypeProvider
SaintActivityTypeProvider
SaintTicketStatusProvider
ActivityStatusProvider
AllPreferenceKeysProvider
AppointmentCautionWarningProvider
AppointmentCompleted
AppointmentFavouriteListProvider
AppointmentGroupProvider
AppointmentTypeProvider
AssociateTypeListProvider
ChatbotProvider
ChatChannelProvider
ChatUserProvider
ColorIndexProvider
ContactFavouriteListProvider
CreateDocumentTemplatePluginsProvider
CredentialGroupProvider
CRMScriptProvider
DashboardEntityList
DashboardTileEntityTypeProvider
DashboardTileListProvider
DayOfMonthProvider
DirectionProvider
DisconnectPersonActionsProvider
DocumentCompletedProvider
DocumentFavouriteListProvider
DocumentGroupProvider
DocumentTypesListProvider
EjUserProvider
ErpConnections
ErpConnectors
EventHandlerTypeProvider
ExecuteOnEventProvider
ExportTemplateProvider
FaqCategoryProvider
FavouriteTypeListProvider
FilterFutureDateList
FindProduct
FontSizeProvider
FontTypeProvider
FormMailingsProvider
FormProvider
FormSubmissionStatusProvider
FreetextSearchEntityProvider
ImportBlankActionProvider
ImportContactDuplicateMatchProvider
ImportDuplicateActionProvider
ImportDuplicateActionWithoutAddProvider
ImportFieldsProvider
ImportNewListItemProvider
ImportNewPositionItemProvider
ImportNewProductListItemProvider
ImportPersonDuplicateMatchProvider
ImportPhoneUrlsEmailProvider
ImportProductDuplicateMatchProvider
ImportProductFieldsProvider
Iso6391LanguageProvider
LanguageProvider
MailingFavouriteListProvider
MailingTypeProvider
MergeTagsProvider
MonthProvider
NextAvailableTime
OfMonthProvider
PeriodProvider
PeriodsProvider
PersonContactFavouriteListProvider
PersonFavouriteListProvider
PluginProvider
PreferenceKeyProvider
PreferenceLineItemProvider
PreferenceSearchProvider
PreferenceSectionProvider
ProjectFavouriteListProvider
QuoteAlternativeProvider
QuoteApprovers
QuoteConnections
QuoteConnectors
QuoteDocumentGroupFields
QuoteDocumentOrderByFields
QuoteDocumentTypeProvider
QuoteLineStatus
QuoteVersionProvider
QuoteVersionStateListProvider
RecurrenceEveryMonthProvider
RecurrenceWeekCycleProvider
ReportCategoryProvider
ReportLayoutProvider
SaleDoneProvider
SaleFavouriteListProvider
SaleStatusProvider
SelectionFavouriteListProvider
SelectionMemberTypeClean
SelectionMemberTypeList
SelectionMemberTypeListV2
SelectionMemberWithMailListProvider
SelectionTypeList
SelectionUnionTypeList
SentimentScoreProvider
SourceListProvider
SystemEventTypeProvider
TicketFavouriteListProvider
TicketOriginProvider
TicketReadStatusProvider
TicketSLevelProvider
TicketStatusProvider
TimeListProvider
TypeGroupProvider
TypicalSearchProvider
UdefFieldsProviderBase
UdefFieldTypeProvider
VisibleForListProvider
VisibleInMenuProvider
VisibleInProvider
VisibleInTaskProvider
WeekdayProvider
WeekNumberProvider
Implements
ISoListProvider
ISoList
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
public abstract class LiteralsOnlyBase : ISoListProvider, ISoList, IPlugin

Constructors

LiteralsOnlyBase()

Declaration
protected LiteralsOnlyBase()

Properties

ExtraInfo

Declaration
protected string ExtraInfo { get; }
Property Value
Type Description
String

HeadingItems

Declaration
public List<ISoListHeading> HeadingItems { get; }
Property Value
Type Description
List<ISoListHeading>

HistoryInfo

Declaration
public HistoryInfo HistoryInfo { get; }
Property Value
Type Description
HistoryInfo

HistoryItems

Declaration
public List<ISoListItem> HistoryItems { get; }
Property Value
Type Description
List<ISoListItem>

ListName

Declaration
protected string ListName { get; }
Property Value
Type Description
String

RawHeadingItems

Declaration
protected List<ISoListHeading> RawHeadingItems { get; }
Property Value
Type Description
List<ISoListHeading>

RawHistoryItems

Declaration
protected List<ISoListItem> RawHistoryItems { get; }
Property Value
Type Description
List<ISoListItem>

RawRootItems

Declaration
protected List<ISoListItem> RawRootItems { get; }
Property Value
Type Description
List<ISoListItem>

RootItems

Declaration
public List<ISoListItem> RootItems { get; }
Property Value
Type Description
List<ISoListItem>

SearchValue

Declaration
protected string SearchValue { get; set; }
Property Value
Type Description
String

Methods

AddItems()

Subclass contract: use the RawRootItems and RawHeadingItems properties to add items to your literals-only list. The base class will then perform any search or flattening required.

Declaration
protected abstract void AddItems()
Remarks

Lists that only contain literals can be either flat or grouped. If you create a grouped list and the caller specifies a forceFlatList attribute, the base class will do the flattening for you.

Examples

This example shows a typical implementation of a literal list, in this case the date interval list from the Filter dialog:

	[MDOProviderPlugin( "FilterFutureDate" )]
	public class FilterFutureDateList : LiteralsOnlyBase
	{
		protected override void AddItems()
		{
			RawRootItems.Add( new SoListItem( 1, "[SR_DATE_RANGE_3MONTHS]", string.Empty, string.Empty ) );
			RawRootItems.Add( new SoListItem( 2, "[SR_DATE_RANGE_4MONTHS]", string.Empty, string.Empty ) );
			RawRootItems.Add( new SoListItem( 3, "[SR_DATE_RANGE_6MONTHS]", string.Empty, string.Empty ) );
			RawRootItems.Add( new SoListItem( 4, "[SR_DATE_RANGE_1YEAR]", string.Empty, string.Empty ) );
			RawRootItems.Add( new SoListItem( 5, "[SR_DATE_RANGE_2YEAR]", string.Empty, string.Empty ) );
		}
	}

Note that using a search in this case yields unexpected results. The search is performed on the raw items, which contains resource tags - and that is not what you actually want to search against. So resources + search do not go together.

Construct(String, String, Int32[], Boolean, String, Boolean)

Declaration
public virtual void Construct(string listName, string additionalInfo, int[] historyIDs, bool onlyReadHistory, string searchValue, bool forceFlatList)
Parameters
Type Name Description
String listName
String additionalInfo
Int32[] historyIDs
Boolean onlyReadHistory
String searchValue
Boolean forceFlatList

Implements

ISoListProvider
ISoList

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top