ObjectGears Help

Forum   ObjectGears (Version:

Web service GetData

This method reads one record from a particular class or query.


OGDataResult GetData(string modelCode, string parentCode, int parentType, int id)

Parameter modelCode is a code of a model.

Parameter parentCode is a code of a class or query from the model entered by parameter modelCode.

Parameter parentType defines if  parentCode is a class or a query.

Value Description
0 Class
1 Query

Parameter parentId is class or query Id.

Parameter Id is Id of the record that shall be read from the ObjectGears system.


Calling method by means of ID or model and class code.

$ws = 'http://localhost:55668/OGService.asmx?WSDL'
$source = New-WebServiceProxy -Uri $ws -UseDefaultCredential

#reading variables from WebService
$OGData = $source.GetType().Namespace + '.OGData'

#calling method
$objData = $source.GetData('jira', 'ukol', 0, 100)

#enumeration of column collection of the given class record
foreach($data in $objData.Datas)
  foreach($item in $data.ColumnData)
    #Key = column ID
    #Value = column value
    Write-Host $item.Key - $item.Value

This website is using cookies files to provide services and analyse visits. You agree with that by using this website.     Further information