GetFirstProperty Method for a Property Set

The GetFirstProperty method for a property set returns a string that contains the name of the first property in a property set.

Format

oPropSet.GetFirstProperty()

No arguments are available.

Usage

The usage for the GetFirstProperty method for a property set is similar to the usage for the GetFirstProperty method for a business service. For more information, see Usage for a Method that Gets a Business Service Property in GetFirstProperty Method for a Business Service.

Used With

Browser Script, COM Data Control, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script

Examples

The following example uses the GetFirstProperty method to get the first property, and then uses the GetNextProperty method to return all subsequent properties. If the GetNextProperty method returns a null value, then Siebel CRM terminates the loop:

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
   var propName = "";
   var propVal = "";

   propName = Inputs.GetFirstProperty();

   // stay in loop if the property name is not an empty string
   while (propName != "") {
      propVal = Inputs.GetProperty(propName);

      // if a property with the same name does not exist
      // add the name value pair to the output
      if (!Outputs.PropertyExists(propName)) {
         Outputs.SetProperty(propName, propVal);
      }

      propName = Inputs.GetNextProperty();

   }
   return (CancelOperation);
}

Related Topics

For more information, see the following topics: