tryGetInstanceProps Method

Get the props of a Relationship instance

tryGetInstanceProps<T extends RelationshipProps>(relClassFullName: string, criteria: Id64String | SourceAndTarget): T extends RelationshipProps | undefined

note Useful for cases when a relationship may or may not exist and throwing an Error would be overkill.

see Relationships.getInstanceProps

Parameter Type Description
relClassFullName string The full class name of the relationship in the form of "schema:class"
criteria Id64String | SourceAndTarget Either the relationship instanceId or the source and target Ids

Returns - The RelationshipProps or undefined if the relationship is not found.

Defined in

Last Updated: 08 January, 2020