Siebel – LookUpName() and LookUpValue()
by Nitin JainHi all,
I was working for a multi lingual implementation recently. This means, the Status on the Order Header was in English if the language selection of logged in user was English, and in Swedish if the language of the logged in user was Swedish.
I came across this problem that at times when the user invoked my custom method on the Orders screen by clicking a button, the Order Status value was passed in his native language – English (ENU) or Swedish (SVE).
The requirement was to
1) read the existing status,
2) do some processing based on as to what the status was, and
3) then reset the Order Status to some new value.
The setting of the Status (3) was not a major issue, as I directly used LookUpValue() function for that which is used very commonly in the Siebel community.
The LookUpValue() function in Siebel queries the S_LST_OF_VAL table in Siebel DB with a combination of TYPE and the LIC (Language Independent Code), and returns the Display Value of that particular LOV.
Step (2) was also not a major issue, achieved through custom workflows.
However, when reading the value in the step (1) to do some processing, it became difficult. The problem was that the Status field could return either of the Swedish or the English value when invoking the custom workflow in step (2). The only option that seemed to be working at the moment was to hard code the values from both the languages, both ENU and SVE. I felt this as a very bad solution. That is when I came across this vanilla Siebel function called LookUpName() which in principle works exactly opposite to LookUpValue().
The function LookUpName() queries on S_LST_OF_VAL table with a combination of TYPE and Display Value (or LIC Code too) and returns the LIC Code in return. This meant, I need not hard code the Order status values in my workflow processing in step (2) for branching. I just started running a LookUpName() on the Order Status received in the beginning, which returned me the LIC code corresponding to that Status.
This LIC code is Language Independent and thus, same in all languages. Thus, I can now do all branching in my custom workflow based on only one LIC code value, and thus it becomes much cleaner!
This also had an added advantage that if the client (CRM owner) decides to implement more languages to this multilingual application, he just needs to apply the corresponding language pack. No changes to script or Workflows are needed.
Please note that I did this using Workflow Output step which meant no Scripting was needed.
Thus, my problem was resolved.
Related posts:
- Siebel – LOV Number Limitation Siebel List of Values is probably the most commonly used...
- Siebel – Looping multiple records – Update records Hi, We often come across a requirement where we need...
- Siebel – SIS OM PMT Service There are lots of vanilla business services available in Siebel...
- Siebel – EAI Siebel Adapter – Looping Multiple Records This is a follow-up post on the post, Siebel –...
- Siebel – EAI Queue – Usage I had introduced the concept of Siebel EAI Queues in...
- Siebel – Symbolic Strings Consider this a brief introductory tutorial on Symbolic Strings in...
- Siebel – SIA BC Utility Service – Loop multiple records This is a vanilla business service which provides an extensive...
An interesting observation here..
I tried doing both the LookUpValue() and LookUpName() and worked beautifully in the Calculated Expression kind of fields.
However, I noticed that when trying to use the same in eScript, it worked fine for LookupValue(). However, when trying to use LookupName(), it gave the error that the method LookupName() is not supported at application level.
Interesting! Anybody went further??