Option Set
# Option Set
Option Sets or by new MS naming "Choices" are sets of options used in specific fields.
# Conventions
# Code placement
Option sets are used by option set fields so they have to be in MODEL layer. They are stored in OptionSets folder:
…\CDS\OptionSets\
# Naming
There is a naming convention we use to make it clear on the first sight that this component is an option set.
Pattern: {publisher prefix}_{name}{typecode}
Examples:
TALXIS: talxis_contracttypecode
PCT (PLC): plc_desktypecode
# Option value
Options are represented by option values with label descriptions. This option has to be unique but just in that option set. It means that you can have bunch of same option values in lots of option sets but this option has to be just once in one option set.
We use values of 9 numbers and first 5 number are same as publisher prefix.
Examples: TALXIS: (publisher prefix = 74207)
<optionset Name="talxis_documenttypecode" localizedName="Document Type" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OptionSetType>picklist</OptionSetType>
<IsGlobal>1</IsGlobal>
<IntroducedVersion>1.0.0.0</IntroducedVersion>
<IsCustomizable>1</IsCustomizable>
<displaynames>
<displayname description="Typ dokumentu" languagecode="1029" />
<displayname description="Document Type" languagecode="1033" />
</displaynames>
<Descriptions>
<Description description="" languagecode="1029" />
<Description description="" languagecode="1033" />
</Descriptions>
<options>
<option value="742070000">
<labels>
<label description="Originální smlouva" languagecode="1029" />
<label description="Original Contract" languagecode="1033" />
</labels>
</option>
<option value="742070001">
<labels>
<label description="Dodatek" languagecode="1029" />
<label description="Amendment" languagecode="1033" />
</labels>
</option>
<option value="742070002">
<labels>
<label description="Příloha" languagecode="1029" />
<label description="Annex" languagecode="1033" />
</labels>
</option>
</options>
</optionset>
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
PCT (PLC): (publisher prefix = 86142)
<optionset Name="plc_opportunitytypecode" localizedName="Opportunity Type" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OptionSetType>picklist</OptionSetType>
<IsGlobal>1</IsGlobal>
<IntroducedVersion>1.0.0.0</IntroducedVersion>
<IsCustomizable>1</IsCustomizable>
<displaynames>
<displayname description="Opportunity Type" languagecode="1033" />
</displaynames>
<Descriptions>
<Description description="" languagecode="1033" />
</Descriptions>
<options>
<option value="861420000">
<labels>
<label description="Office Leasing" languagecode="1033" />
</labels>
</option>
<option value="861420001">
<labels>
<label description="HubHub" languagecode="1033" />
</labels>
</option>
<option value="861420002">
<labels>
<label description="Qubes" languagecode="1033" />
</labels>
</option>
</options>
</optionset>
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29