Siebel Community

Welcome to Siebel Community. In this place you can find all the topics related to Siebel. This place is dedicated to provide information about how to implement Siebel CRM application. Siebel Technical/Functional consultants can get information from basics of Siebel CRM to advanced topics like EAI, EIM, eScripting, Workflows, Assignment Manager, Actuate Reports, Territory Management. This place also included Forums and Blogs to help you further.

Monday, September 12, 2011

How to set the color, disable, hide and text style property for a control at runtime

Prior to version 6, users could not change the property values of a control during runtime. In Siebel Enterprise version 6, a new method named 'SetProperty' was introduced; this method is used to change the following visual properties of a control:
Background Color - Must state the RGB value
Foreground Color - Must state the RGB value
Text Style - Example: Bold, Underlined etc
Enabled - True or False (used to activate or inactivate a control)
Shown - True or False (used to make a control visible or invisible)
Limitations:
1. The 'SetProperty' method may only be used to change the visual properties of controls that reside in a form applet. The method cannot identify a 'control' within a list applet because according to the application the 'list' part of the applet is a control and therefore cannot distinguish the fields within. Change Request12-3ANC6N has been logged as a Document Enhancement to clarify this information in the Bookshelf.
2. In the Siebel Enterprise version 6.X documentation for SetProperty it shows
oControl.SetProperty(propName, propValue)
The parenthesis should not be included as it generates a syntax error. It should therefore be removed as it causes confusion.
The correct syntax isoControl.SetProperty "propName", "propValue"
Change Request 12-1U0S1D has been logged as a Documentation Enhancement to address this.
Example:
The Siebel Visual Basic (VB) code below is placed in the PreSetFieldValue event in the 'Action' business component. When the user changes a value in the Activity Option Applet the 'Priority' field's background colour changes.
Dim applet As AppletDim control As Control
Set applet = theApplication.ActiveAppletSet control = applet.FindControl("Priority")control.SetProperty "BackgroundColor", "215 152 4"
There are further eScript examples in Bookshelf V6 section 'Siebel Object Interfaces Reference' Chapter 3 Page 3-231.
As mentioned in Bookshelf, if more than one property is to be set, each must be set in a separate statement.The SetProperty method is not supported in Siebel7.0.x. The SetProperty method is available for browser scripts in Siebel 7.5 for the following controls: CheckBox, ComboBox, TextBox, Text Area and Label. Change Request 12-DP6B5G has been logged as an Enhancement Request to allow this method to work with button controls.

No comments:

Post a Comment