Copy Method for a Property Set
The Copy method returns a copy of a property set.
Format
oPropSet.Copy()
No arguments are available.
Usage
The Copy method creates a copy of a property set, including any properties and child property sets. Siebel CRM typically passes a property set through a reference, so making a copy allows you to manipulate a property set without affecting the original property set.
Used With
Browser Script, COM Data Control, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script
Examples
The following Siebel VB example uses a copy of a property set to store the original values of the properties, and displays the original and Pig-Latin forms of the properties:
(general)
(declarations)
Option Explicit
Function PigLatin (Name1 As String) As String
Dim Name2 As String, FirstLetter As String
Name2 = Right$(Name1, len(Name1) - 1)
FirstLetter = Left$(Name1, 1)
Name2 = UCase(Mid$(Name1, 2, 1)) & _
Right$(Name2, Len(Name2) - 1)
Name2 = Name2 & LCase(FirstLetter) & "ay"
PigLatin = Name2
End Function
Sub ClickMe_Click()
Dim Inputs As PropertySet, Outputs As PropertySet
Dim message As String, propName, propVal, newPropVal
set Inputs = TheApplication.NewPropertySet
Inputs.SetProperty "Name", "Harold"
Inputs.SetProperty "Assistant", "Kathryn"
Inputs.SetProperty "Driver", "Merton"
set Outputs = Inputs.Copy()
propName = Outputs.GetFirstProperty()
do while propName <> ""
propVal = Outputs.GetProperty(propName)
newPropVal = PigLatin(propVal)
Outputs.SetProperty propName, newPropVal
message = message & propVal & " has become " & _
newPropVal & Chr$(13)
propName = Outputs.GetNextProperty()
loop
TheApplication.RaiseErrorText message
Set message = Nothing
Set Outputs = Nothing
Set Inputs = Nothing
End Sub