Tuesday, April 12, 2011

Business Component - PreWriteRecord Event

Business Requirement: 
Create an Opportunity and step off the record. An error message should be thrown if the Probablity of the Opportunty is 0% and Sales Cycle is blank.
Solution:

Where to put the code:
@ Business Component level we are writing the code proactively,
as this is validation at record level we decided to put the code at Pre event...

function BusComp_PreWriteRecord ()

{

var prob; // declaring the objects

var sales; //declaration again

prob = this.GetFieldValue("Primary Revenue Win Probability");

sales = this.GetFieldValue("Sales Stage");


if(prob == '0' && sales == '' )

{

TheApplication().RaiseErrorText("Percentage should be greater than 0 and Sales Stage should not be blank");

}

}

Compile and test!!!


BusComp_PreWriteRecord Event : Called before a row is written out to the database.
This event can perform any final validation necessary before any internal record-level validation is performed.
 
CAUTION: Take caution when using the Raise Error and RaiseErrorText methods in
BusComp_PreWriteRecord, because they cancel operations. For example, if RaiseErrorText is used in
BusComp_PreWriteRecord, the user or code will not be able to step off the current record until the
condition causing the RaiseErrorText method to be invoked is addressed.

Friday, April 1, 2011

Enter Siebel License Keys

Once I got into a situation where I needed to enter the license key into the siebel tools and the field where we can enter the License keys is disabled.

Trick for such situation:
1. Open Siebel Tools, (Sample)

2. Now Keep pressing the Shift Key.

3. Open Help Menu -> Technical Support.

4. You see the field "License Keys" enabled

Where you can enter the new keys. Hope this helps.



Followers

Search This Blog