RaiseError()

2
Oct/08
1

A while ago I discovered the function RaiseError() in Siebel. To be honest, a colleague said that I could use that function in stead of RaiseErrorText().

Since we are implementing a multi-lingual application, all error messages should be multi-lingual. So whenever we wanted to throw an error message in eScript, we used the following code combining RaiseErrorText and LookupMessage in order to throw the error in the correct language.

TheApplication().RaiseErrorText(TheApplication().LookupMessage(“User Defined Errors”, “X_DISPATCH_REQUIRED_FIELDS”));

As you can see, this requires a lot of typing and this was also the opinion of a colleague. He then suggested me to use the RaiseError function instead. This is actually the same, but you just have to pass the name of the error you want to throw as an argument.

TheApplication().RaiseError(“X_BARCODE_NOT_NUMERIC”);

Off course you have to create the error message first in Tools in Message Category -> User Defined Errors and not in User Defined Strings as I tried.

The RaiseError function saves you time on typing code, so be sure to use it next time you want to throw an error in you script when running a multi lingual application.

VN:F [1.8.2_1042]
Rating: 4.3/5 (3 votes cast)
VN:F [1.8.2_1042]
Rating: +1 (from 1 vote)

DefaultFocus

28
Jul/07
3

Since my knowledge of Siebel is far from complete, I’m still learning new stuff every day. Yesterday I was working on a little requirement that said that the tab order on the Service Request applet should have a logical order. So I set the tab layout and when I tested it, everything was ok, but when I wanted to create a new Service Request, the cursor automatically showed up in the Contact field instead of the Contract field which was tab n° 1.

After looking in supportweb and asking my colleagues for advice I stumbled upon the DefaultFocus_New Applet User Property where you can specify the field that should have the focus on creating a new record.

Who know’s how much time I would have spent looking to solve this problem if I didn’t found this user property.

VN:F [1.8.2_1042]
Rating: 0.0/5 (0 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Filed under: Configuration
1,145 views

Creating new Profile Attribute

29
Apr/07
1

For some applets in our application it was implemented that only a user with a certain position could create new records. To do this, I used scripting to enable/disable the invoke of the method if the user had the correct position. Since this was done with the position name hardcoded in the script, this was not the best method because the position name could change or an extra position could be added which also needed this function.

Therefor we wanted to search for position type, but there is no method in Siebel eScript to return the position type. Then a colleague remebered that there is a way to create new profile attributes which contains user info (such as the postion type we needed). After searching on Supportweb we found out that it was very easy to do this.

To create a new profile attribute, to the following:

Browse for the business component Personalization Profile and create a new field called “Position Type” (or copy the field Position) with following values:

  • Mulitvalue Link: Position
  • Dest Field: Position Type

After compiling the Business Component, you can get this profile attribute in a script with TheApplication().GetProfileAttr(“Position Type”)

VN:F [1.8.2_1042]
Rating: 4.3/5 (7 votes cast)
VN:F [1.8.2_1042]
Rating: +1 (from 1 vote)
Filed under: Configuration
3,871 views