Hiding controls in query mode
Jun/094
This issue came up during a UAT phase when testers reported to see two buttons twice when they wanted to query. After investigating this issue, I found out that some controls stayed on the appled even when the applet was in Query Mode.
Problem:
This issue only occurs with controls that invoke a custom method.
Normally when you query in Siebel, you only see the Go, Cancel and Query Assistant buttons but for some reason, buttons that invoke a custom method are also showing on the applet after pressing Query.
In our case this was causing confusion since our custom buttons had the same caption.
Solution:
First I tried to find a solution on Metalink, but there I found the suggestion to use BrowserScripting to hide the buttons but that is like fighting fire with fire.
Then, I’ve noticed that the buttons are not showing in the Query Mode if they are disabled before you press the query button. So the solution is very simple. Set the CanInvoke for the method behind the button to false and the button will not show when you do a query.
To do so, start by setting a Profile Attribute to true on the WebApplet_PreInvokeMethode for the NewQuery method. This Profile Attribute has to be set back to false of course to avoid that you’re button stays disabled. The best place to do this is on the PreInvoke of the methods ExecuteQuery and CancelQuery.
function WebApplet_PreInvokeMethod (MethodName)
{
switch(MethodName){
case “NewQuery”:
TheApplication().SetProfileAttr(“QueryMode”, “TRUE”);
return (ContinueOperation);
break;
case “ExecuteQuery”:
case “CancelQuery”:
TheApplication().SetProfileAttr(“QueryModeBPG”, “FALSE”);
return (ContinueOperation);
break;
}
return (ContinueOperation);
}
Next, you test for this Profile Attribute in the WebApplet_PreCanInvokeMethod to set the CanInvoke for the method to true or false.
If the Profile Attribute is true the Query button is pressed and the button should become disabled so it’s not displayed on the applet. When the query is executed or cancelled, the Profile Attribute is false and the button can become enabled again if other conditions are met.
case ‘StartActivity’:
if( … ){
CanInvoke = ‘FALSE’;
}
else{
if(TheApplication().GetProfileAttr(“QueryMode”) == “TRUE”){
CanInvoke = “FALSE”;
return (CancelOperation);
}
else{
CanInvoke = ‘TRUE’;
return (CancelOperation);
}
}
break;
When you now query, you see that the buttons are no longer displayed.
After running or canceling the query, the buttons are displayed again and will be enabled if they have to be.
Email client automation object not found
Jun/090
I faced this problem while working on an issue with the resending of an email linked to a Service Request. The template to resend this mail was an MS Outlook template.
Problem:
I was using the Siebel Dedicated Client because I wanted to test some eScript I wrote. When I tried to resend an email linked to a Service Request I received this error message.
The Siebel email client automation object is not found. Please check your browser setting to make sure downloading ActiveX control is enabled. If this does not solve your problem, please ask your system administrator to check the configuration.(SBL-CSR-00900)
Solution:
To make sure the Email client automation object can be downloaded correctly, perform the steps below:
- Check the server to make sure that Automation object is enabled and your browser setting allows ActiveX objects to be downloaded.
- Make sure that SWE properties are set
In your .cfg file set the following parameters in the [SWE] section to TRUE:
EnableWebClientAutomation = TRUE
EnableEmailClientAutomation = TRUE - Downloading ActiveX controls
If you suspect that a user does not have the correct ActiveX controls, clear the existing ActiveX controls from the user’s browser, and on the next login, the controls should be downloaded. Follow these steps to clear the existing control:- Clear the browser and reload its ActiveX controls.
- Exit out of browser.
- Launch Internet Explorer and navigate to Tools > Internet Options.
- Select Delete Cookies button.
- Select Delete Files button.
- Select Clear History button.
- Select the Settings button and select the View Objects button.
- Delete all of the files in this window.
- Login to the Siebel Application again



