Touchstone Re 2023 API Reference
GetLossModTemplates Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ObjectManagementServiceClient Class : GetLossModTemplates Method
Contains a GetObjectBaseRequest that identifies the Business Unit SID and SQL Instance SID associated with the objects to retrieve.
Retrieves a set of Loss Modification Analysis Templates.

You can manage Loss Modification Analysis Templates only from the Touchstone Administration Console.

Syntax
Public Function GetLossModTemplates( _
   ByVal request As GetObjectBaseRequest _
) As GetObjectBaseResponse
Dim instance As ObjectManagementServiceClient
Dim request As GetObjectBaseRequest
Dim value As GetObjectBaseResponse
 
value = instance.GetLossModTemplates(request)
public GetObjectBaseResponse GetLossModTemplates( 
   GetObjectBaseRequest request
)

Parameters

request
Contains a GetObjectBaseRequest that identifies the Business Unit SID and SQL Instance SID associated with the objects to retrieve.

Return Value

A GetObjectBaseResponse containing a list of objects in the specified business unit and SQL instance.
Remarks
To find the Business Unit SID to pass into this method, call the GetBusinessUnits() method.

To find the SQL Instance SID to pass into this method, call the GetSqlInstances() method.

Example
The following example shows how to get a list of the Loss Modification Analysis Templates associated with a given Business Unit using the GetLossModTemplates() method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.LossAnalysis.Api;
using AIR.Services.LossAnalysis.Data;
using AIR.Services.ObjectManagement.Api;
using System.Collections.Generic;
            
class SnippetGetLossModificationTemplatesRequest
{
    private static void GetLossModificationTemplates(int businessUnitSid, int sqlInstanceSid, int projectSid, int targetSid, int dataSourceSid)
    {
        ObjectManagementServiceClient client = new ObjectManagementServiceClient();
        GetObjectBaseRequest request = new GetObjectBaseRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        GetObjectBaseResponse response = client.GetLossModTemplates(request);
        if (response.Status.Code == StatusCode.Success)
        {
            foreach (ObjectBase obj in response.Objects)
            {
                Console.WriteLine("------------------------------------------------------------");
                //Pass this in the Submit Loss Modification API Call
                Console.WriteLine("Target SID: " + obj.TargetSid);
                Console.WriteLine("Name: " + obj.Name);
                Console.WriteLine("Created By: " + obj.Author);
            }
        }
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ObjectManagementServiceClient Class
ObjectManagementServiceClient Members