| MainAvoidDuplicates Method |
The method should check that the value of the field "fldToCheckPropSysName" on the target
does not equal to any of the values of the same property in objects of the type "masterDOTGuidStr",
If "masterDOTComparisonFilterSetPropSysName" is configured,
code method checks only for masterDOT data objects where set property "masterDOTComparisonFilterSetPropSysName"
is equal to any of the values in "masterDOTComparisonFilterCommaSeparatedSetPropValuesGuidsStr";
If shouldCheckBlackList is set to true,
then code method should also check that the value of the field "fldToCheckPropSysName" on the target
does not equal to any of the values in any Blacklist entry of the type "blackListDOTGuidStr"
with set property "blackListDOTComparisonFilterSetPropSysName"
with values "blackListDOTComparisonFilterCommaSeparatedSetPropValuesGuidsStr".
If equal, transaction should stop and display error message with text defined in "errorMessageText"
Codemethod usage | |
---|
Designed to be used in a process only | No |
Action Object (data object type) | Computer (Identity) |
Security | Overridden |
Namespace:
Omada.OE.UtilityCodeAssembly
Assembly:
Omada.OE.UtilityCodeAssembly (in Omada.OE.UtilityCodeAssembly.dll) Version: 15.0.0.0
Syntaxpublic bool AvoidDuplicates(
CodeMethodInvokeContext context,
string fldToCheckPropSysName,
string masterDOTGuidStr,
string masterDOTComparisonFilterSetPropSysName,
string masterDOTComparisonFilterCommaSeparatedSetPropValuesGuidsStr,
bool checkBlackList,
string blackListDOTGuidStr,
string blackListDOTComparisonFilterSetPropSysName,
string blackListDOTComparisonFilterCommaSeparatedSetPropValuesGuidsStr,
string errorMessageTextAppStringGuidStr
)
Parameters
- context
- Type: Omada.OE.ModelCodeMethodInvokeContext
An invoke context object. - fldToCheckPropSysName
- Type: SystemString
Property System name pointing to field to check - masterDOTGuidStr
- Type: SystemString
UID of the master data object type - masterDOTComparisonFilterSetPropSysName
- Type: SystemString
Property system name of a set property on the Master DOT to filter objects in the comparison - masterDOTComparisonFilterCommaSeparatedSetPropValuesGuidsStr
- Type: SystemString
UIDs of the values of the set property masterDOTComparisonFilterSetPropSysName that should be consider to filter (comma separated) - checkBlackList
- Type: SystemBoolean
Boolean property if check should be done against black list. If set to true, all blacklist related parameters must be configured - blackListDOTGuidStr
- Type: SystemString
UID of the black list data object type - blackListDOTComparisonFilterSetPropSysName
- Type: SystemString
Property system name of a set property on the Blacklist Entry DOT (if blank, no blacklist entry should be used in the comparison - blackListDOTComparisonFilterCommaSeparatedSetPropValuesGuidsStr
- Type: SystemString
UIDs of the values of the set property blackListDOTComparisonFilterSetPropSysName that should be consider to filter blacklist entries - errorMessageTextAppStringGuidStr
- Type: SystemString
Guid of the AppString that is used as error message if code method finds duplicate
Return Value
Type:
BooleanFalse = The code method failed, True = The Codemethod succeeded.
See Also