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

NameTypeRequiredDescription
objectNamestringYesName of the object whose related data we wish to retrieve
idstringYesID of the record whose related data we wish to retrieve
fromVersionTablebooleanNo (default=false)Whether or not to retrieve the data from the version history table for the object
specificVersionnumericNo (default=0)If retrieving from the version history, set a specific version number to retrieve
selectFieldsarrayNo

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" }