Siebel Object Interfaces Reference > Siebel Object Interfaces Reference > Object Interfaces Reference >

Business Component Invoke Methods


This topic describes methods you can use with the InvokeMethod method. It includes the following topics:

Overview of Methods That Manipulate the File System

To manipulating the file system, you can use the following methods:

  • CreateFile
  • GetFile
  • PutFile

You can store a file in the local file system on the Siebel Server where your configuration runs the script. You can also return this file. You can use a UNC (Universal Naming Convention) format. For example, \\server\dir\file.txt. You can use a DOS folder. For example, c:\dir\file.txt.

The Siebel Server must be able to access the UNC path or mounted file system. If you use a Java client to run the Siebel Java Data Bean, then the Siebel Server must be able to access all files.

You can use these methods with business components that use the CSSBCFile class. These methods do not serialize the files from the client of a third-party application or place files from the client of a third-party application in the Siebel file system.

ClearLOVCache Method for a Business Component

The ClearLOVCache method clears the cache for the list of values (LOV) in the object manager, In works in a way that is similar to the Clear Cache button that Siebel CRM displays in the List of Values view of the Administration - Data screen. This method does not return any information.

The ClearLOVCache method clears only the object manager cache. It does not clear the session cache.

Format

BusComp.InvokeMethod("ClearLOVCache")

No arguments are available.

Used With

To use this method, you can use a BusComp.InvokeMethod call with the following interfaces:

  • Browser Script
  • COM Data Control
  • COM Data Server
  • Siebel Java Data Bean
  • Mobile Web Client Automation Server
  • Server Script
Examples

The following Siebel eScript example is for Server Script:

function WebApplet_PreInvokeMethod (MethodName)

{

if (MethodName == "TestMethod") {

var lov_bo = TheApplication().GetBusObject("List Of Values");

var lov_bc = lov_bo.GetBusComp("List Of Values");

lov_bc.NewRecord(NewAfter);

lov_bc.SetFieldValue("Type", "ACCOUNT_STATUS");

lov_bc.SetFieldValue("Name", "Hello");

lov_bc.SetFieldValue("Value", "Hello");

lov_bc.SetFieldValue("Order By", "12");

lov_bc.SetFieldValue("Translate", "Y");

lov_bc.WriteRecord();

lov_bc.InvokeMethod("ClearLOVCache");

lov_bc = null;

lov_bo = null;

return (CancelOperation);

}

return(ContinueOperation);

}

CreateFile Method for a Business Component

To create a file in the Siebel file system from an external source, you can use the CreateFile method. This method returns one of the following values:

  • Success. The operation succeeded.
  • Error. The operation did not succeed.
Format

BusComp.InvokeMethod("CreateFile", SrcFilePath, KeyFieldName, KeepLink)

Table 72 describes the arguments for the CreateFile method.

Table 72. Arguments for the CreateFile Method
Argument
Description

SrcFilePath

The fully qualified path to the source file on the Siebel Server or the Siebel client.

KeyFieldName

The name of the field in the business component that contains the File Name. For example, AccntFileName in the Account Attachment business component.

KeepLink

Applies to URLs. You can use one of the following values:

  • Y. Use this value if the link to the file is stored as an attachment.
  • N. Use this value if you reference the actual file.

The actual file is compressed in a Siebel proprietary format. Siebel CRM uploads and stores it in that format on the Siebel File System.

Usage

Before you call the CreateFile method, call the NewRecord method to make sure Siebel CRM creates a new business component record.

Used With

To use this method, you can use a BusComp.InvokeMethod call with the following interfaces:

  • COM Data Control
  • COM Data Server
  • Siebel Java Data Bean
  • Mobile Web Client Automation Server
  • Server Script
Examples

The following example is in Siebel VB:

Dim RetValue as String
Dim fileBC as BusComp

'Instantiate fileBC as the appropriate attachment business component

fileBC.NewRecord NewAfter
RetValue = fileBC.InvokeMethod ("CreateFile", "c:\Demo\Image.bmp", "AccntFileName", "Y")
fileBC.WriteRecord

The following example is in Siebel eScript:

var fileBC;

// Instantiate fileBC as the appropriate attachment business component

fileBC.NewRecord(NewAfter);
RetValue = fileBC.InvokeMethod ("CreateFile", "C:\\Demo\\Image.bmp", "AccntFileName", "Y");
fileBC.WriteRecord();

The following example is in COM Data Control:

Dim errCode as Integer
Dim Args(2) as String
Dim RetValue as String
Dim fileBC as BusComp

'Instantiate fileBC as the appropriate attachment business component

Args(0) = "C:\Demo\Image.bmp"
Args(1) = "AccntFileName"
Args(2) = "Y"

fileBC.NewRecord NewAfter, errCode
RetValue = fileBC.InvokeMethod ("CreateFile", Args, errCode)
fileBC.WriteRecord

GenerateProposal Method for a Business Component

To create a new proposal record, the GenerateProposal method uses a template and settings from the DocServer as input. The DocServer is third-party software that specializes in searching, storing, and serving documents. It creates the proposal.

Format

To specify a custom template, use the following format:

BusComp.InvokeMethod("GenerateProposal", RecordExists, Replace, TemplateFile)

To use the default proposal template, use the following format:

BusComp.InvokeMethod("GenerateProposal", RecordExists, Replace)

Table 73 describes the arguments for the GenerateProposal method.

Table 73. Arguments for the GenerateProposal Method
Argument
Description

RecordExists

You can use one of the following values:

  • TRUE. Siebel CRM uses the proposal that is currently chosen.
  • FALSE. Siebel CRM creates a new record.

Replace

You can use one of the following values:

  • TRUE. Siebel CRM copies the template file from the template to the proposal as a draft file.
  • FALSE. You typically set the Replace argument to FALSE.

TemplateFile

Optional. You can use one of the following values:

  • A string that specifies the name of the template to use. If this argument receives a string, then the proposal searches for the first template record whose name contains the string passed.
  • NULL. Uses the default template. This is default value.

Used With

To use this method, you can use a BusComp.InvokeMethod call with the following interfaces:

  • Browser Script
  • COM Data Control
  • COM Data Server
  • Siebel Java Data Bean
  • Mobile Web Client Automation Server
  • Server Script

GetFile Method for a Business Component

The GetFile method gets a file from the Siebel file system and places that file in the local file system on the Siebel Server or the Siebel client. This method returns one of the following values:

  • Operation succeeded. Returns a string that contains Success, OutFilePath.

    where:

    OutFilePath is the fully qualified path to the file that resides in the user temp folder on the Siebel client or on the Siebel Server.

  • Operation failed. Returns a string that contains Error.
Format

BusComp.InvokeMethod("GetFile", KeyFieldName)

Table 74 describes the arguments for the GetFile method.

Table 74. Arguments for the GetFile Method
Argument
Description

KeyFieldName

The name of the business component field that contains the file name. For example, AccntFileName in the Account Attachment business component.

Usage for the GetFile Method

The record pointer must point to the record you seek. If necessary, you must query for the record ID, using the NextRecord method to advance through the returned set of records until the record pointer points to the record you seek.

Used With

To use this method, you can use a BusComp.InvokeMethod call with the following interfaces:

  • COM Data Control
  • COM Data Server
  • Siebel Java Data Bean
  • Mobile Web Client Automation Server
  • Server Script
Examples

The following example uses Siebel VB:

Dim RetValue as String
Dim fileBC as BusComp

'Instantiate fileBC as the appropriate attachment business component

'Query for the required attachment record

RetValue = fileBC.InvokeMethod ("GetFile", "AccntFileName")

The following example uses Siebel eScript:

var RetValue;
var fileBC;

// Instantiate fileBC as the appropriate attachment business component

// Query for the required attachment record

var RetValue = fileBC.InvokeMethod("GetFile", "AccntFileName");

The following example uses COM Data Control:

Dim errCode as Integer
Dim Args as String
Dim RetValue as String
Dim fileBC as BusComp

'Instantiate fileBC as the appropriate attachment business component

'Query for the required attachment record

Args = "AccntFileName"
RetValue = fileBC.InvokeMethod ("GetFile", Args, errCode)

PutFile Method for a Business Component

The PutFile method updates a file in the Siebel file system with a newer file. This method returns one of the following values:

  • Success. The operation succeeded.
  • Error. The operation did not succeed.
Format

BusComp.InvokeMethod("PutFile", SrcFilePath, KeyFieldName)

Table 75 describes the arguments for the PutFile method.

Table 75. Arguments for the PutFile Method
Argument
Description

SrcFilePath

The fully qualified path to the file on the Siebel Server or the Siebel client.

KeyFieldName

The name of the field in the business component that identifies the file name. For example, AccntFileName in the Account Attachment business component.

Usage

Usage for the PutFile method is similar to usage for the GetFile method. For more information, see Usage for the GetFile Method.

After Siebel CRM uses the PutFile method to save a file attachment, you must make sure it calls the WriteRecord method so that the updated attachment is visible in the Siebel client. For more information, see WriteRecord Method for a Business Component.

Used With

To use this method, you can use a BusComp.InvokeMethod call with the following interfaces:

  • COM Data Control
  • COM Data Server
  • Siebel Java Data Bean
  • Mobile Web Client Automation Server
  • Server Script
Examples

The following example uses Siebel VB:

Dim RetValue as String
Dim fileBC as BusComp

'Instantiate fileBC to the appropriate attachment business component

'Query for the attachment record to be updated

RetValue = fileBC.InvokeMethod ("PutFile", "c:\Demo\Image.bmp", "AccntFileName")
fileBC.WriteRecord

The following example uses Siebel eScript:

var RetValue;
var fileBC;

// Instantiate fileBC to the appropriate attachment business component

// Query for the attachment record to be updated

RetValue = fileBC.InvokeMethod("PutFile", "c:\\Demo\\Image.bmp", "AccntFileName");
fileBC.WriteRecord();

The following example uses COM Data Control:

Dim errCode as Integer
Dim Args(1) as String
Dim RetValue as String
Dim fileBC as BusComp

'Instantiate fileBC to the appropriate attachment business component

'Query for the attachment record to be updated

Args(0) = "C:\Demo\Image.bmp"
Args(1) = "AccntFileName"
RetValue = fileBC.InvokeMethod ("PutFile", Args, errCode)
fileBC.WriteRecord

RefreshBusComp Method for a Business Component

The RefreshBusComp method runs the current query again for a business component and makes the record that was previously active the active record. The user can see that Siebel CRM updated the view but the same record remains highlighted in the same position in the list applet. This method does not return any information.

Format

BusComp.InvokeMethod("RefreshBusComp")

No arguments are available.

Used With

To use this method, you can use a BusComp.InvokeMethod call with the following interfaces:

  • Browser Script
  • COM Data Control
  • COM Data Server
  • Siebel Java Data Bean
  • Mobile Web Client Automation Server
  • Server Script

This method only works with a business component that uses the CSSBCBase class.

RefreshRecord Method for a Business Component

The RefreshRecord method updates the currently highlighted record, including updating business component fields in the Siebel client. It positions the cursor on the highlighted record. It does not update other records that are currently available in the Siebel client. This method does not return any information.

Format

retVal = BusComp.InvokeMethod("RefreshRecord")

No arguments are available.

Used With

To use this method, you can use a BusComp.InvokeMethod call with the following interfaces:

  • Browser Script
  • COM Data Control
  • Siebel Java Data Bean
  • Mobile Web Client Automation Server
  • Server Script

This method only works with a business component that uses the CSSBCBase class.

SetAdminMode Method for a Business Component

The SetAdminMode method can enable or disable visibility rules for a business component. It sets the Admin property of a view. This method does not return any information.

Format

BusComp.InvokeMethod("SetAdminMode", flag)

Table 76 describes the arguments for the SetAdminMode method.

Table 76. Arguments for the SetAdminMode Method
Argument
Description

flag

You can use one of the following values:

  • TRUE. Siebel CRM calls the business component in Admin mode.
  • FALSE. Siebel CRM does not call the business component in Admin mode.

Used With

To use this method, you can use a BusComp.InvokeMethod call with the following interfaces:

  • COM Data Control
  • COM Data Server
  • Siebel Java Data Bean
  • Mobile Web Client Automation Server
  • Server Script
Siebel Object Interfaces Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.