GetFirstProperty Method for a Business Service
The GetFirstProperty method returns a string that contains the name of the first property that is defined for a business service.
Format
oService.GetFirstProperty()
No arguments are available.
Usage for a Method that Gets a Business Service Property
The order that Siebel CRM uses to store properties in a property set is random. For example, the Name property is the first property that Siebel Tools displays in the Business Services list for every business service. However, the GetFirstProperty method might return any business service property, not necessarily the Name property. To correct this situation it is recommended that you add the properties in a property set to an array, and then sort that array.
To get or modify a property value, you can do the following:
Use the GetFirstProperty method or GetNextProperty method to return the name of a property.
Use the name you returned in the preceding step in one of the following ways:
To return a property value, as an argument in the GetProperty method.
To set a property value, as an argument in the SetProperty method.
For more information, see the following topics:
Used With
Browser Script, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script
Example of Using Methods that Return a Business Service Property
The example in this topic returns the number of property sets that belong to a business service.
The following example is in Siebel eScript:
function countPropSets(busService)
{
var propSetName = busService.GetFirstProperty();
var count = 0;
while(propSetName != "")
{
count++;
propSetName = busService.GetNextProperty();
}
return count;
}
The following example is for Siebel Java Data Bean:
public int countPropSets(SiebelService busService)
{
int count = 0;
try
{
String propSetName = busService.getFirstProperty();
while(propSetName != "")
{
count++;
propSetName = busService.getNextProperty();
}
}
catch(SiebelException sExcept)
{
return 0;
}
return count;
}