Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >

SetUserProperty Method


Sets the value of a named business component user property. The user properties are similar to instance variables of a BusComp.

Syntax

BusComp.SetUserProperty propertyName, newValue

Argument
Description

propertyName

String containing the name of the user property to set

newValue

String containing the property value

Returns

Not applicable

Usage

The advantage of user properties is that they can be accessed from anywhere in the code (including from other applications through COM) using GetUserProperty. An instance variable, on the other hand, can be accessed only from within Siebel VB from the same object on which the variable is declared.

The value of the property is reset every time you instantiate a new business component.

NOTE:  SetUserProperty does not interact directly with user properties defined in Siebel Tools.

Used With

COM Data Server, Java Data Bean, Mobile/Dedicated Web Client Automation Server, Server Script

Example

The following example is in Siebel VB.

Sub BusComp_SetFieldValue (FieldName As String)
   Select Case FieldName
      Case "Committed"
         me.SetUserProperty "Flagged", "Y"
   End Select
End Sub

The following is the equivalent example in Siebel eScript.

function BusComp_SetFieldValue (FieldName)
{
   switch (FieldName)
   {
      case "Committed":
         this.SetUserProperty("Flagged", "Y");
   }
}

See Also

GetUserProperty Method

Siebel Object Interfaces Reference