About: This post will take us through some tips and tricks to broadcast administrative or informational message on Siebel Application. We will see how We can call Javascript functions on Siebel Web Templates and load messages and display it on the Login Page from a file without caching it so that the user is not forced to clear cache every time he returns to the Siebel Page.
Sometime back I was asked to Broadcast a message to all the Siebel users on Production Server that the Siebel Application will be down for maintenance during the Weekend. Many of us might be aware that Siebel provides a Vanilla Screen for Broadcasting a Message to the users where We just have to enter a Broadcast message and We are all set. The client went a step ahead and asked us if We can display a similar message on the Login Page and since it was Production Server We were not allowed to bounce it before the maintenance schedule. At that time the only idea We had was to display the text on the Login Web Template or via Splash Text on CFG but that change won't take effect unless the Siebel & Web Servers are bounced (I believe there might be ways of doing it from Siebel Server Parameters on Client as well do let us know in comments if any of you has any idea or knows some other way). So to address this problem We came up with a solution in the further releases. The solution involved maintaining the Broadcast/Welcome Message on a text file which We read from a javascript and We called the JavaScript function from the Login Page.
I will detail the solution in steps for a better understanding:
1. We will create a folder in Siebel Custom Scripts where We will maintain a Plain Text file BroadCastMsg.txt and a javascript file BroadCastMsg.js.
Do comment below if this post helps you in any way or if you know or have implemented a similar functionality in a different way.
Sometime back I was asked to Broadcast a message to all the Siebel users on Production Server that the Siebel Application will be down for maintenance during the Weekend. Many of us might be aware that Siebel provides a Vanilla Screen for Broadcasting a Message to the users where We just have to enter a Broadcast message and We are all set. The client went a step ahead and asked us if We can display a similar message on the Login Page and since it was Production Server We were not allowed to bounce it before the maintenance schedule. At that time the only idea We had was to display the text on the Login Web Template or via Splash Text on CFG but that change won't take effect unless the Siebel & Web Servers are bounced (I believe there might be ways of doing it from Siebel Server Parameters on Client as well do let us know in comments if any of you has any idea or knows some other way). So to address this problem We came up with a solution in the further releases. The solution involved maintaining the Broadcast/Welcome Message on a text file which We read from a javascript and We called the JavaScript function from the Login Page.
I will detail the solution in steps for a better understanding:
1. We will create a folder in Siebel Custom Scripts where We will maintain a Plain Text file BroadCastMsg.txt and a javascript file BroadCastMsg.js.
Public Folder Path |
- The Plain Text file will contain the Broadcast Message in HTML format. We may keep it in a simple text, the reason I chose to keep it in HTML format was that it will give me the flexibility to define the styling of the text without any other change. Contents of the File are as below:
<Marquee><p style='background-color:black'><font color='yellow'>Dear User, The Website will be down for maintenance on Sunday from 6 p.m. to 10 p.m. - Siebel Administrator</font></p></Marquee>
Note: Marquee is used to produce a ticker effect. Marquee is a deprecated HTML tag, we can use JS and CSS customizations to display the same effects. We have used it here to avoid coding and since it is still recognized by almost all browsers hence it will work.
- The Javascript File contains a small function to read the contents of the file. The function uses ajax call to read the file without caching the contents so that everytime the user returns to the login screen they see the latest Broadcast message without clearing the Browser cache. Snippets Below:
function initBM(){
try
{
$.ajax({
url:'23044/scripts/siebel/custom/BroadCastMsg/BroadCastMsg.txt',
cache: false,
success: function (data){
$("#broadMsg").html(data);
}
});
}
catch(e)
{
console.log(e);
}
}
2. After We have all these resources We need a space in Login Web Page where We will display the Broadcast Content. For this, We will create an empty <div> in our Login Page and add some lines in the header of Login Template to include the Javascript file, jquery libraries and Text file we created in first step so that it loads with the Login Page. We have to include the jquery libraries as our javascript has Jquery methods which won't work without including the library.
Add the below lines to the header :
<!-- Files for Broadcast message - Hitesh Dhanwani -->
<link href="siebel/custom/BroadCastMsg/BroadCastMsg.txt" rel="text/plain">
<link href="files/custom/BroadCastMsg.css" rel="stylesheet">
<swe:include-script file="3rdParty/jquery.js"/>
<swe:include-script file="siebel/custom/BroadCastMsg/BroadCastMsg.js"/>
<!-- END Files for Broadcast message-->
Add the below Div to the body:
<!--Div Container for BroadCast Msg - Hitesh Dhanwani -->
<div id="broadMsg">
</div>
<!--END Div Container for BroadCast Msg-->
SWELogin.swt:
3. Replace the Files on Server, bounce the Web Server and Siebel Server and We are done.
Now We have a file Where Administrators can enter any message and will display to the users on the Login Screen. On one window I have the BroadCastMsg.txt file opened and on the other, the Login Page and We will be able to see the same message on the Login page The Video demonstrates how.
Do comment below if this post helps you in any way or if you know or have implemented a similar functionality in a different way.
awwsome :D
ReplyDeleteThis is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the good work. I have been meaning to write something like this on my website and you have given me an idea. Roblox APK Download Latest & Updated Version
ReplyDeleteRegular visits listed here are the easiest method to appreciate your energy, which is why why I am going to the website everyday, searching for new, interesting info. Many, thank you! TubeMate 3 APK Download Free Latest Version
ReplyDelete메이저리그중계 I like your post. It is good to see you verbalize from the heart and clarity on this important subject can be easily observed...
ReplyDelete