June 24, 2013

How to increment date in Siebel workflows?

It is supposed to be the one of the toughest task in e-script is to handle date fields and manipulate the data. Recently I learned it is fairly simple to manipulate the date values in Siebel Workflows as compared to e-script.

This revelation goes to Naresh Lalam from siebel.ittoolbox . After his one of the comments I went up and verified that date fields can be simply manipulated from expression of Workflow Process

Provided :
1: Process Proerty storing Date is of type : Date
2: Number of days which needs to subtracted to added should be integer.
Output Arguments








On simulating these expression it results extremely simple output.

Workflow Process Properties












Credit : Naresh

cheers :)

How to make field conditionally editable in Siebel?

Requirement: To make Siebel Fields editable only from certain views or certain users?

This sort of customization could come up when business would like to update fields from certain views only and make then read only from elsewhere.

Solution: This requirement can be achieved in many ways, listing script-less solutions here:

1. Clone the Applet and views and make the control read only by setting the read only flag on Applet

Benefits: As the solution makes copy of UI layer, it does not impact the business layer. If there is any script which is updating the field as part of another process it wont require any changes as field on the BC remains unchanged.
Drawbacks: Duplicate objects make application complex and difficult to manage.


2. Create Field Read Only Field user property to make the read only if the active view name is not same as the intended view.
This can be done by using : GetProfileAttr('ActiveViewName').
Benefits: No new object created thus keep the keep maintenance simple and keep the business logic at one location.

3. Use GetProfileAttrAsList in calculated field to check the responsibility of user.
If user has the responsibility then field will be editable and for all other users field will be read only. This responsibility can be added to SADMIN as well so that background workflows can only update this field.

syntax of calculated field:
IIf(InList(“EditableField”,GetProfileAttrAsList(“User Responsibilities”)))
If you have come across any other  scenario in which you were forced to write script then please share it with us in comments below.

Restrict certain queries on BC/EBC/VBC : GetSearchExpr()

Recently someone posted requirement on it toolbox to capture and change the queries executed by user on certain Siebel business components.

Few consultant suggested use pre query event of business component to change the search spec using GetSearchExpr and SetSearchExpr, however it is not possible to achieve this without releasing srf.

Perhaps there was a solution which could be achieved without releasing srf.In such type of requirements we can use Siebel Run Time events and client side business services which are independent of srf release.

June 22, 2013

Siebel Tools and Client is not responding?

Have you done something innovative and Siebel Client have stopped responding? Even task manager is stuck?

Do not restart your machine, instead try these commands from command prompt to force kill the exe:

taskkill /IM siebel.exe /F
taskkill /IM siebdev.exe /F
taskkill /IM iexplore.exe /F
taskkill /IM taskmgr.exe /F

Force kill siebel.exe


Siebel Configuration Interview Questions

Siebel Configuration Interview Questions

Siebel Configuration is one of core areas of Siebel Customization, and it usually get overlooked in projects.  It is equally important for an Siebel Consultant to know the basic configuration items along with specialized skills like EAI, EIM etc.. 

Following are some questions that easily assess the Consultant's understanding over Siebel Configuration.


Question: How to make applet read only in Siebel?

Answer: To make applet permanently read only, one can use No Update, No Insert, No Delete, No Merge property on applet to true. Read more

Question : How to build validation in Action Business Component to ensure that Start date is always a future date?

Answer: Validation field and validation message can be used to enforce the date entered. To check the future data following Syntax can be used.
> Today()

 

Question: How to create validation for first name field in Contact BC to have at least 5 characters?

Answer: Length method can be used in validation field to ensure minimum number of characters are entered in the field.
Syntax :
Len([First Name]) > 5

 

Question : How does Primary Id field improves performance of an MVG field? 

Answer: By default every MVG field executes a separate query on database to fetch data from child BusComp. When primary id field is specified and use primary join flag is set, application does not execute sub-query and instead uses join to fetch the data.



Question : What are the implications if Primary ID field is not used in MVG?

 Answer: If Primary Id is not specified on an MVG then view will take a lot more time to load as for every record in list applet another subquery will be executed.

 

Question : Is it possible to deploy SRF on server if objects are not checked in repository?

Answer:Yes, for Business Service, BusComps, BusObjects and Applet changes, srf can be deployed on server without checking in the objects, however workflow needs all the BO and BC to be checked in before it is activated.


Question: How to disable new record creation for certain users of Siebel?

Answer: Applet's PreCanInvokeMethod Method can be used to disable new button by setting CanInvoke to false, this can be done conditionally by checking the position or responsibility of the current user.


Question: How to make field editable for certain group of users only?


Answer: Create field read only field user property for the field and use calculated field expression to check the responsibilities of user, return N if user has the responsibility to edit the field and Y if it doesn't

Calculated field expression:


IIF(InList("Edit Field",GetProfileAttrAsList("User Responsibilities"))='Y','N','Y')

This way user who don't have the responsibility will see the field readonly.

Question : How to access user preference in script?

Answer: User preferences in siebel are stored in special class base bc which gets its values from spf files stored in file system. Through script user preferences can be retreived by querying the User Preferences BC like :
var oBOUser = TheApplication().GetBusObject("User Preferences");
var oBCUser = oBOUser.GetBusComp("User Preferences");
with(oBCUser)
{
SetViewMode(AllView);
ActivateField(fieldName);
ClearToQuery();
ExecuteQuery();
if (FirstRecord())
{
sDefTempValue = GetFieldValue(fieldName);
}
}

 

Question : How to access system preference in escript?

Query System Preferences BC on Name and Value fields to get the value of system preference..
        var boSysPref = TheApplication().GetBusObject("System Preferences");
        var bcSysPref = boSysPref.GetBusComp("System Preferences");
         bcSysPref.ClearToQuery();
         bcSysPref.ActivateField("Value");
         bcSysPref.SetViewMode(AllView);
         bcSysPref.SetSearchSpec("Name", sName);
         bcSysPref.ExecuteQuery( ForwardOnly );
    
         if (bcSysPref.FirstRecord())
         {
            sValue = bcSysPref.GetFieldValue("Value");
         }return(sValue);
    

Question : How to set system preference in Siebel?

Answer: "Administration Application> System Preference" view can be used to set the value of system preference.

 

Question . What could be reason behind a Picklist field which is not showing the drop down icon?

Answer: There are only three reasons for picklist not showing drop down:
Picklist is not specified on BusComp field.
Picklist is not compiled or Picklist values are not created.
Control's Runtime property is not set to true on Applet

Question : Is it possible to make calculated field as editable?

Answer: Yes, by setting setting pick map on calculated field and field becomes editable, however it won't be able to save the value and will recalculate the value on refresh record.

Question : How can you get the value of parent field value in browser script?

Answer: Only fields displayed on UI are accessible in browser script, it is applicable for all the parent and child bus components.



Popular Interview Questions: