OpenWGA 7.0 - TMLScript reference

HDBModel
Method :

getRelationSources(targetContent, contentClass, relationName, [, params])

On object HDBModel
Usage Retrieves all contents pointing with a defined content relation to the given content
Description

This method is useful to retrieve all documents that point with a specific defined relation to the given document. It utilizes a HQL query und the background to retrieve results.

The optional "params" Lookup table argument can be used to further refine the query executed. It takes the following lookup keys:

  • "extraClause" : An extra HQL clause to insert to the WHERE part of the query
  • "extraParams": A Lookup table containing additional query parameters with key and value
Parameters

targetContent (WGAPI object WGContent

The content document whose relation sources should be fetched

contentClass (String):

The content class whose relation points to the target content

relationName (String):

The name of the relation pointing to the target content

params (Lookup table, optional):

Optional params to the retrieval query

Writable False
Return value A ResultSet of the documents pointing to the target content with the specified relation
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events