| MainSynchronizeTwoWayReference Method |
Method will synchronize the values of a two-way reference on a single ActionObject.
Example: in an ITIL scenario we operate with incidents and problems between which there is a relation.
To model the scenario in OE we have two dataobjecttypes - one for incidents and one for problems.
OE doesn't support two-way relations so to accomodate we create two reference properties called
"related problems" (placed on the incident type) and "related incidents" (placed on the problem type).
To ensure that they are synchronized this method is called whenever either an incident or a problem is created or updated.
Codemethod usage | |
---|
Designed to be used in a process only (Yes/No) | No |
Action Object (data object type) | ActionObject |
Namespace:
Omada.OE.UtilityCodeAssembly
Assembly:
Omada.OE.UtilityCodeAssembly (in Omada.OE.UtilityCodeAssembly.dll) Version: 15.0.0.0
Syntaxpublic bool SynchronizeTwoWayReference(
CodeMethodInvokeContext context,
string forwardRefPropertySysName,
string backwardsRefPropertySysName
)
Parameters
- context
- Type: Omada.OE.ModelCodeMethodInvokeContext
An invoke context object.
- forwardRefPropertySysName
- Type: SystemString
Id of a reference property, that is present on the dataobjecttype of the updated dataobject (ex. an incident).
The dataobjects (ex. problems) that are referred in the property must have (another) reference property
that points backwards to the changed dataobject.
- backwardsRefPropertySysName
- Type: SystemString
Id of a reference property, that is present on the dataobjecttype of the referred dataobjects (ex. problems).
The reference property must point back to the referring dataobjecttype (ex. incidents).
Return Value
Type:
Boolean
See Also