Skip to content
Autana Business Partners

Create a counter in siebel using a list of values

Published on 2 min read

Conceptual illustration of automatic opportunity counter generation in Siebel using list of values

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"

Process flow of Siebel counter using Workflow and 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");

}

}

Execution diagram of automatic counter from WriteRecord event in Siebel

Updated on

Tags

← Back to the blog

  • Data Management

    Optimization of energy consumption

    Discover how the optimization of energy consumption reduces costs and environmental impact. Learn to analyze data, simulate scenarios, and implement energy-saving strategies.

    Read article

  • Analytics

    Talent retention in the digital age: how analytics can help

    Learn how talent retention in the digital age benefits from analytics. Discover how data helps reduce turnover and retain your top employees.

    Read article

  • Success Stories

    Proyect Sourcing Optimization

    In the digital age, Project Sourcing Optimization has become essential for companies aiming to enhance their purchasing processes. By integrating data-driven decision-making and…

    Read article