Siebel Object Interfaces Reference > Interfaces Reference > Application Methods >
NewPropertySet Method
The NewPropertySet method constructs a new property set object. Syntax
Application.NewPropertySet
Returns
A property set Usage
NewPropertySet is used primarily to construct input and output arguments for business services. NOTE: When using NewPropertySet on an existing PropertySet object, old references to this PropertySet are lost. When reusing a PropertySet, use the Reset method on the PropertySet itself.
Used With
Browser Script, COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, Server Script, Web Client Automation Server Example
This method constructs a new property set object. The following example is in 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 COM. SiebelApplication is an Application instance. 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
|