NewPropertySet Method for an Application

The NewPropertySet method creates a new property set. It returns a property set.

Format

Application.NewPropertySet

No arguments are available.

Usage

You can use the NewPropertySet method to create input and output arguments for a business service.

If you use the NewPropertySet method on an existing PropertySet object, then old references to this PropertySet are lost. If you reuse a PropertySet, then use the Reset method on this PropertySet.

Used With

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

Examples

This example creates a new property set. It uses Browser Script:

function Applet_PreInvokeMethod (name, inputPropSet)
{
   if (name == "MyCustomMethod")
   {
      var oBS;
      var inpPS;
      var outPS;
      inpPS = theApplication().NewPropertySet();
      outPS = theApplication().NewPropertySet();
      oBS = theApplication().GetService("New Value Business Service");
      outPS = oBS.InvokeMethod("New Value Method", inpPS);
      inpPS = null;
      outPS = null;
      oBS = null;
      return ("CancelOperation");
   }

   else
   {
      return ("ContinueOperation");
   }
}

The following example is for the Component Object Model (COM):

Dim oBS As SiebelService
Dim inpPS As SiebelPropertySet
Dim outPS As SiebelPropertySet
Dim errCode as integer

Set inpPS = SiebelApplication.NewPropertySet(errCode)
Set outPS = SiebelApplication.NewPropertySet(errCode)
Set oBS = SiebelApplication.GetService("New Value Business Service", errCode)
oBS.InvokeMethod "New Value Method", inpPS, outPS, errCode
Set inpPS = Nothing
Set outPS = Nothing
Set oBS = Nothing

The following example is in Siebel eScript:

function WebApplet_PreInvokeMethod (MethodName)
{
   if (MethodName == "MyCustomMethod")
   {
      var oBS;
      var inpPS;
      var outPS;
      inpPS = TheApplication().NewPropertySet();
      outPS = TheApplication().NewPropertySet();
      oBS = TheApplication().GetService("New Value Business Service");
      oBS.InvokeMethod("New Value Method", inpPS, outPS);
      inpPS = null;
      outPS = null;
      oBS = null;
      return (CancelOperation);
   }

   else
   {
      return (ContinueOperation);
   }

}

The following example is in Siebel VB:

Function WebApplet_PreInvokeMethod (MethodName As String) As Integer
   If MethodName = "MyCustomMethod" Then
      Dim oBS As Service
      Dim inpPS As PropertySet
      Dim outPS As PropertySet
      Set inpPS = TheApplication.NewPropertySet
      Set outPS = TheApplication.NewPropertySet
      Set oBS = TheApplication.GetService("New Value Business Service")
      oBS.InvokeMethod "New Value Method", inpPS, outPS
      Set inpPS = Nothing
      Set outPS = Nothing
      Set oBS = Nothing
      WebApplet_PreInvokeMethod = CancelOperation
   Else
      WebApplet_PreInvokeMethod = ContinueOperation
   End If

End Function