Let’s imagine that when we create new records in the opportunities, we want the name of the same to be composed of:
Counter + Opportunity ID + product description
The counter as you want generic for opportunities uses a list of values.
List of values:
Type: OPTY_SEQUENCE
Display Value: 1
SCI: 1
To increase the value in the LOV by 1, we create a workflow that will be executed after the new record of the opportunity is created.
The workflow will have the following steps:
Siebel Operation “Query List of Values”
Siebel Operation “Update”
Siebel Operation “Query List of Values”

Properties:
BC: List Of Values;
Operation: Query;
Search Spec Input Arguments
Expression BC: List Of Values
Sequence: 1
Filter BC: List Of Values
Type: Literal
Search Specification: Here will be the Type equal to the name of the LOV_TYPE, in this case OPTY_SEQUENCE
Output Arguments:
Output Argument 1
Property Name: LOV ID
Sequence: 2
Type: Business Component
BC Name: List Of Values
BC Field: Id
Output Argument 2
Property Name: Oppty Count
Sequence: 3
Type: Business Component
BC Name: List Of Values
BC Field: Value
Siebel Operation “Update”
Properties:
BC: List Of Values
Operation: Update
Field Input Arguments:
Field Name: Value
Type: Expression
Value: [&Oppty Count]+1
Search Spec Input Argument:
Expression BC: List Of Values
Sequence: 1
Filter BC: List Of Values
Type: Literal
Search specification: The Id will be equal to the LOV ID of the previous step
Finally, you have to go to the WriteRecord event of BC Opportunity and say the condition in which the workflow is executed.
function BusComp_WriteRecord()
{
var oActiveBO = TheApplication(). ActiveBusObject(). Name();
var svc = TheApplication(). GetService(“Workflow Process Manager”);
var Input = TheApplication(). NewPropertySet();
var Output = TheApplication(). NewPropertySet();
if(oActiveBO == “Opportunity”) {
Input.SetProperty(“ProcessName”,”EJ Oppty Count WF”);
svc. InvokeMethod(“RunProcess”, Input, Output);
this. InvokeMethod(“ClearLOVCache”);
}
}


