How to rename the predefined service categories in IT Shop?
Is it possible to rename the predefined service categories such as the "Distribution lists" and "Security groups", etc. in IT Shop?
The default service category names cannot be modified. When attempting to create custom groups which conflict with default names, this will result in the error “There is already an object using this alternate key”.
It is possible to customize the logic for the default groups and use these default groups for "special needs".
Here are the overview steps:
1. Create the custom define product group which has to be used for the “special needs”.
2. Copy the mentioned process “VI_ADS_ADSGroup_Publish_to_ITShop”.
3. In the copied process, modify the step “Create AccProduct” - the parameter “val_UID_AccProductGroup” should be modified to the below:
' If the AD group has a specific attribute use a custom defined product group
' In the example we use 'ExtensionAttribute1'
If $ExtensionAttribute1:Text$ = "SpecificValue" Then
' use a custom defined ProductGroup
' We could use the UID of the group, disadvantage: the uid is different in every database
' that's why we search for the uid by the name - the name is the same everywhere
Dim f as ISqlFormatter = Connection.SqlFormatter
Value = connection.GetSingleProperty("AccProductGroup", "UID_AccProductGroup", _
f.Comparison("Ident_AccProductGroup", "TheNameOfYourGroup", ValType.String, CompareOperator.Equal, FormatterOptions.IgnoreCase))
If $IsDistributionGroup:Bool$ Then
' here we can use the UIDs directly because they are the same in every db
Value = "DEFAULT_ACCPRODUCTGROUP_ADDLIST"
Value = "DEFAULT_ACCPRODUCTGROUP_ADSECGROUPS"
To place the products in specific service catalog objects based on the properties of corresponding AD groups (i.e. Name, Domain, canonicalName, extensionAttribute8 and etc.) is to create a new process for ADSGroup, Update event. The generation condition for the process is when one of the properties (Name, Domain, canonicalName , extensionAttribute8 etc.) is being changed. For Example:
If $cn$ <> $cn[o]$ _<
or $CanonicalName$ <> $CanonicalName[o]$ _
or $ExtensionAttribute8:Text$ <> $ExtensionAttribute8[o]:Text$ Then
Value = True
After that, an update job needs to be added to the process which will change the UID_AccProductGroup for the AccProduct of the ADSGroup.