We have moved to a Please visit there for updated posts

Wednesday, October 10, 2007

Siebel List of Values - A Strategic Move - Continued.

Last time I said that I will be presenting a Solution to make Required Fields dynamic and SRF independent. So I am back with What I promised.


Siebel Service Request module was to be implemented because of a new implementation the business requirements were being changed all the time. One Strange requirement was to make the Required Fields of a business component dynamic. So that they can be changed without a release. Now, we all know one way to make a field required is to set the Required Property of the field to true. But that would mean that if I were to change that a new SRF deployment will be required.

LOV's again were the life saver for us. We created an LOV called SRV_REQ_FIELD and in the Display value we provided the names of the fields that we wanted as Required Fields. In the Business Component PreWrite Record we queried for that particular LOV and traversed through the records that were active. If the Field provided in the LOV did not contained a value then an error was raise stating that the value for that particular required field was not supplied. I am giving the Pseudo Code below to what that script might look like

BOLOV = TheApplication().GetBusObject("List Of Values");
BCLOV = BOLOV.GetBusComp("List Of Values");
with (BCLOV)
Query for LOV Type as 'SR_REQ_FIELD' and Active Flag = 'Y'

IsRecord = BCLOV.FirstRecord();
while( Last record is not reached)
if ( this.GetFieldValue(BCLOV.GetFieldValue("Name")) == "" )
Raise Errro Text ("Value not given")

This solution is not recommended if the number of fields that are required is fairly large. But still can be really handy in many situations.

Hope you liked this post! If yes, Do post your comments.


You Might want to read following articles also.