getDeNormalizedManyToManyData()
Overview
public struct function getDeNormalizedManyToManyData(
required string objectName
, required string id
, boolean fromVersionTable = false
, numeric specificVersion = 0
, array selectFields
)
Returns a structure of many to many data for a given record. Each structure key represents a many-to-many type property on the object. The value for each key will be a comma separated list of IDs of the related data.
Arguments
Name | Type | Required | Description |
---|---|---|---|
objectName | string | Yes | Name of the object whose related data we wish to retrieve |
id | string | Yes | ID of the record whose related data we wish to retrieve |
fromVersionTable | boolean | No (default=false) | Whether or not to retrieve the data from the version history table for the object |
specificVersion | numeric | No (default=0) | If retrieving from the version history, set a specific version number to retrieve |
selectFields | array | No |
Example
relatedData = presideObjectService.getDeNormalizedManyToManyData(
objectName = "event"
, id = rc.id
);
// the relatedData struct above might look like { tags = "C3635F77-D569-4D31-A794CA9324BC3E70,3AA27F08-819F-4C78-A8C5A97C897DFDE6" }