Wednesday 30 September 2015

Fixing Text Area Issue in Siebel using custom PR file

Hi all,

In Open UI there is a change in behaviour of fields of type Text Area, in HI there used to be a icon in text area field on on click on that a popup opened and the data was displayed separately in popup.
But in Open UI the functionality has been replaced with dragable Field option, wherea icon apper in the botton right of field and the field can be enlarged.








We had a requirement recently to fix the Text Area field issue, we used the below appraoch.

1. Increase the dimension of TextArea field onFocus.








2. Set the values of dimensions to initial onBlur.






This does not replicates the HI behaviour but serves the purpose.
PR file looks Like


 if (typeof(SiebelAppFacade.LOYHideFieldPR) === "undefined")
 {
 SiebelJS.Namespace("SiebelAppFacade.LOYFixTextAreaPR");
 define("siebel/custom/LOYFixTextAreaPR", ["siebel/phyrenderer"],
 function () {
 SiebelAppFacade.LOYFixTextAreaPR = (function ()
 {
 function LOYFixTextAreaPR( pm )
 {
 /* Be a good citizen. Let Superclass constructor function gets executed first */  SiebelAppFacade.LOYFixTextAreaPR.superclass.constructor.call( this, pm );
 /* Static List of Control Identifier which will be displayed in Carousel; */
 }
 SiebelJS.Extend( LOYFixTextAreaPR, SiebelAppFacade.PhysicalRenderer );  LOYFixTextAreaPR.prototype.ShowUI = function()  SiebelAppFacade.LOYFixTextAreaPR.superclass.ShowUI.call( this );
 var pm = this.GetPM();
 //Enlarge Comments field on Focus Rahul Verma
 $('[aria-labelledby = "Description_Label"]').focus(function()
{
 $(this).css( {
 'height': '147px',
 'width': '488px',
 'position': 'inherit',
 'margin': '2px 0px',
 })
 });
 $('[aria-labelledby = "Description_Label"]').blur(function()
{ $(this).css( {
 'height' : '48px',
 'width' : '104px' ,
 'position' : 'inherit'
 })
 });
 };
 return LOYFixTextAreaPR ;
 }
());
 return "SiebelAppFacade.LOYFixTextAreaPR";
 });
}

Hope this was helpful..

#Note : please see post http://www.siebelfoundations.com/2017/08/siebel-open-ui-enhancement-fixing-text.html for a jQuery based solution to this issue.

Monday 21 September 2015

How to Show custom Error message in Siebel Workflows

Hi all , while using workflows we all have used Stop step , to stop the execution of workflow and display error message.
By default stop step provides many vanila messages, what if we have to diaplay oue own custom message?

This can be done in 2 ways.

1. Using WF_ERR_CUSTOM_N in Error code , which defaults error message to %1 and error to display can be set as literal value in Multi value Property window.












2. Using WF_ERR_CUSTOM_N in Error code , which defaults error message to %1 and error to display can be set as Expression in Multi value Property window.











Hope this was helpful.

Conditionally hide a field using PR file in siebel

Hi all,

Recently i had a requirement to hide a field conditionally based on the value of another field. This could be done using browser script but since we are using Open UI so we achieved it using
Physical Renderer file(PR). The arrpoach is preety simple.

1. Need to Identify the field depending on which to hide the other field or Hide same field.
2. Write the logic in PR file to hide the field.
3. Register the custom PR against the applet in Mainfest Administration.












The exact logic is :









Result
Field Active is hidden if the value is N, This can be modified for other requirement as well we just need to identify the correct element /field to hide, using inspect element.









PR file looks Like


if (typeof(SiebelAppFacade.LOYHideFieldPR) === "undefined")
 {
 SiebelJS.Namespace("SiebelAppFacade.LOYHideFieldPR"); define("siebel/custom/LOYHideFieldPR", ["siebel/phyrenderer"], function ()
 { SiebelAppFacade.LOYHideFieldPR = (function () { function LOYHideFieldPR( pm )
 { /* Be a good citizen. Let Superclass constructor function gets executed first */ SiebelAppFacade.LOYHideFieldPR.superclass.constructor.call( this, pm );
 /* Static List of Control Identifier which will be displayed in Carousel; */
 }
 SiebelJS.Extend( LOYHideFieldPR, SiebelAppFacade.PhysicalRenderer );
LOYHideFieldPR.prototype.ShowUI = function()  { SiebelAppFacade.LOYHideFieldPR.superclass.ShowUI.call( this );
 var pm = this.GetPM();
 var controls = this.GetPM().Get("GetControls");
 var cntrl = controls[ "ActiveFlag" ];
 var ActiveFlg = pm.ExecuteMethod( "GetFieldValue", cntrl );
 // alert(ActiveFlg); Test to check if value is retrieved or not
 if(ActiveFlg == "N")
 {
 $('[aria-labelledby = "ActiveFlag_Label"]').hide();
 $('#ActiveFlag_Label').parent().hide();
 } };
 return LOYHideFieldPR ; }());
 return "SiebelAppFacade.LOYHideFieldPR";
 });
}

Hope this was helpful..

Fixing UI issue using CSS in Open UI

 Hi All ,

 In my previous post http://siebelfoundation.blogspot.in/2015/09/adding-new-css-in-siebel.html i explained how to register a new css in siebel. In this post i will show you how to make changes in CSS and deploy on server.
 The steps are very simple.

 1. We need to use the console to identify the Object on which we need to make changes
    Press F12 and select Inspect element from the top left of the consle window.










Hover on the element you need to apply any change and click on the element.









CSS and HTML tags related to the element will be seen in the right corner of console.

Identify the element and test changes in the console, once changes have been identified we will move the changes to custom CSS file.


Issue : Fields Width is too small and text is not appearing properly







Solution : Identified the Class for the field and increased the field width.









2. Write the code in custom CSS file located on webserver under "swse/public/enu/files/custom/NewCss.css"
    Once you have idetified and tested the changes in console now you need to add the changes in CSS file

// custom CSS file

.siebui-align-left { width: 180px !important; } // For increasing the width

 

3. Clear browser cache and reload siebel application, and your are done.

Hope this was helpful ... 

Friday 18 September 2015

Adding new CSS in Siebel

Hi all,

Recently i had a requirement to make some changes in siebel application layout, the changes were related to CSS. So instead of making changes in existing CSS we prefered to write a new CSS file and register in the application.
The approch is very simple we need to follow below steps.

1. Write a new css file, and add your code there.
2. Save your file under custom folder in Web Server  (swse/public/enu/files/custom/NewCss.css) 
3. Make an entry for your new css in Theme.js file located in (swse/public/enu/23030/script/siebel/custom/Theme.js)
4. Under Administration - Application ,Mainfest File make an entry for Theme.js if its not there.







clear cache and you are done, changes made in new css will be reflected without changing vanila siebel files.
 you need to add the below lines in theme.js to register custom css with the vanila themes.

SiebelApp.ThemeManager.addResource(
    "GRAY_TAB",
    {
       css : {
               "sce-theme" : "files/custom/NewCSS.css"  // Location of CSS file which needs to be added as part of existing theme 
             }
    }
);

SiebelApp.ThemeManager.addResource(
    "TANGERINE_TAB",
    {
      css : {
               "sce-theme" : "files/custom/NewCSS.css"  // Location of CSS file which needs to be added as part of existing theme 
             }
    }
); 
SiebelApp.ThemeManager.addResource(
    "GRAY_ACCORDION",
    {
       css : {
               "sce-theme" : "files/custom/NewCSS.css"  // Location of CSS file which needs to be added as part of existing theme 
             }
    }
);
SiebelApp.ThemeManager.addResource(
    "TANGERINE_ACCORDION",
    {
       css : {
               "sce-theme" : "files/custom/NewCSS.css"  // Location of CSS file which needs to be added as part of existing theme 
             }
    }

I will post details of how to customise the UI in my upcoming post..till then happy reading...:-)

Tuesday 15 September 2015

Query Data between two Dates using Siebel Workflow

Hi All,
recently i had a requirement to fetch data between two dates and send this data to other application in XML format.
The exact requirement was someting like,

1. Allow user to Give two dates and it should return the Records within the given date range.
2. Implement this in a workflow and expose it as a webservice.

I used the below apprach to implement this functionality.

1. Created a workflow and Used EAI Siebel Adapter Busines Service, QueryPage or Query method
2. In Search Spec i gave the below expression

[LOY Transaction.Transaction Date] >= '" + [&StartDate]+ "' AND [LOY Transaction.Transaction Date] =< '" + [&EndDate]+ "'"












this queries the data withing the given date range, the expression can be extended to support other fields as well and Checks for NULL values.

eg. IIf (
  [&TxnNumber] IS NULL ,
  "[LOY Transaction.Transaction Date] >= '" + [&StartDate]+ "' AND [LOY Transaction.Transaction Date] <= '" + [&EndDate]+ "'",
  IIf ([&StartDate] IS NULL OR [&EndDate] IS NULL ,
  "[LOY Transaction.Transaction Number] = '" + [&TxnNumber]+ "'",
  "[LOY Transaction.Transaction Number] = '" + [&TxnNumber]+ "' AND [LOY Transaction.Transaction Date] >= '" + [&StartDate]+ "' AND [LOY Transaction.Transaction Date] <= '" + [&EndDate]+ "'")
  )

 this expession takes in 3rd variable transaction Number in Input as well and allows to query with the following options which was my actual requirement.

1. Only Transaction Number
2. Only Start and End Dates
3. Both Transaction Number and Date Range

Paging can be used if the Number of records is huge.. hope this was helpful.,..

Saturday 12 September 2015

Replicating the functionalty of siebel F9 - Send Email

Hi all, 

recently i had some issue while configuring email functionality so while exploring the solution and analysing the log file i found the functionality being executed on F9 command.

1. F9 send email command uses two method of Outbound communications Manager business service.

2. First it stores the Template body in a variable by using ExpandCommTemplate method ,which is hidden method and not much documentation has been given about it.(for more details please refer http://siebelfoundation.blogspot.in/2015/07/hidden-methods-of-outbound.html)

3. Secondly it uses send message method and uses the value it gets from parsing the template as Message body ,email from the recipient group and communication profile which user selects after pressing F9. (for details about send message method please refer http://siebelfoundation.blogspot.in/2015/04/how-to-test-email-notification-in.html)



So this the  reason why HTML templates cannot be sent using F9  ,as the method ExpandCommTemplate converts template body in plain text not HTML.
Hope this was helpful.  cheers ..

Setting value of a field depending on values of other field

Hi all. 
Recently I had a requirement where i had to populate the value of a field depending on other fields. To achieve this i used post default value with a conditional expression, the exact requirement was something like.

1. If type of transaction is Redemption and Sub type is Product then set the field value Product Name to value say Sample Product.

2.else set it to null.

The solution can also be achieved by scripting but its more easy with configuration. 
We made a expression that validates the values of type and subtype and the sets the value of product field.
expr : iif( [Type] = "Redemption" AND [Sub Type] = "Product" , "Sample Product" , "")








Add this expression in post default value and u r done.

Thursday 3 September 2015

Using List of values to control flow of workflow

Hi all, recently i had a requirement to enable and disable Email notification in a workflow depending on some flag or user provided value.
To achieve this we used LOV to conditionally control the notification flow.
We used the following step.

1.Create a LOV type say ENABLE_EMAIL_NOTIFICATION.

2.Set Display name to TRUE and parent LIC to TRUE.

this value TRUE will be used as a conditon to execute the process.

Now in the workflow create a decision step and in the condition branch add the following condition.

Lookupvalue(ENABLE_EMAIL_NOTIFICATION,"TRUE") = "TRUE"

this expression takes input lov type and parent lic and get the Display value, so the condition executes only if value of LOV is TRUE.

Hope this was helpful.  

Wednesday 2 September 2015

Siebel HTML Email Templates - Embedding Images and FIelds

Hi All,

recently i had a requirement to send welcome email to user upon registration, the welcome mail was a HTML template with Tables, Div's and Embeded images.
the approach is prety simple we need to use Advanced Email Templates to form the template.

need to follow the below steps

1.go to Admin - Communication --> All Templates



2.go to Advanced Tab - Create a new record and check HTML flag.
3.go to Template Items and Add HTML file and Images.








the HTML file is the actual template which will be sent in mail Body and Images that are added as attachment will be used in the HTML file.
4.under HTML file record Check the Substitute value and Message Body flag.







the HTML file can be configured as per requirement also field values can be used in the template using the format as described

<html><head><style>
#main {
   height:800px;
   background-color:#F2F2F2;
   width:600px;
}
#header {
    text-align:center;
    padding:5px;
}
#section {
    float:left;
    padding:10px;
}
#footer {
    clear:both;
    text-align:center;
   padding:5px;
}
</style></head><body>
<div id="main">
<div id="header">
<img src="images2" style="width:600px;height:228px;>
</div>
<div id="section">
<h2>Dear [Full Name]</h2>
<p>
THE ULTIMATE SHOPPING EXPERIENCE, MADE EVEN MORE REWARDING<br>
</p>
<p>
<img src="images3" style="width:600px;height:228px;>
</p>
</div>
<div id="footer">
Copyright © ABC Store
</div><div></body></html>

Now when email is sent it is recieved in the below format









Hope this was helpful . 

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...