WebApplet_Load Event
Siebel CRM calls the WebApplet_Load event immediately after it loads an applet. It does not return any information.
Format
WebApplet_Load()
No arguments are available.
Usage
-
To avoid returning a null value, do not call TheApplication.ActiveBusObject from the WebApplet_Load event. Instead, you can use this.BusObject to get a reference to the current business object.
-
Do not call ExecuteQuery against the current BusComp in WebApplet_Load.
Used With
Server Script
Examples
The following example is in Siebel eScript:
function WebApplet_Load()
{
var currBC:BusComp = this.BusComp();
currBC.ClearToQuery();
currBC.SetSortSpec("Name (DESCENDING)");
currBC = null;
}
In this case, this event is used to set a Sort Specification that is different than that in the underlying:
Business Component. This allows this particular Applet to sort the records uniquely. The user can sort the data as they wish, but they will initially be presented with this Sort Specification.
Cleanup. You will not harm anything by setting this variable to null even though it points to the active instance of the Business Component. This variable is only a pointer to the BusComp that is backing this Applet, not the instance itself.
function WebApplet_Load ()
{
try
{
var currBC = this.BusComp();
with (currBC)
{
SetViewMode(OrganizationView);
ClearToQuery();
SetSearchSpec("Last Name", "A*");
}
}
catch (e)
{
TheApplication().RaiseErrorText(e.errText);
}
}
The following example is in Siebel VB:
Sub WebApplet_Load
Dim iReturn As Integer
Dim currBC As BusComp
Set currBC = Me.BusComp
With currBC
.SetViewMode OrganizationView
.ClearToQuery
.SetSearchSpec "Last Name", "A*"
End With
End Sub
Related Topics
For more information, see the following topics: