Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Siebel Object Interfaces Reference > Object Interfaces Reference > Business Component Invoke MethodsThis topic describes methods you can use with the InvokeMethod method. It includes the following topics:
Overview of Methods That Manipulate the File SystemTo manipulating the file system, you can use the following methods: 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, 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 ComponentThe 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 in a high interactivity client. FormatBusComp.InvokeMethod("ClearLOVCache") Used WithTo use this method, you can use a BusComp.InvokeMethod call with the following interfaces:
ExamplesThe 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.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.InvokeMethod("ClearLOVCache"); CreateFile Method for a Business ComponentTo 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: FormatBusComp.InvokeMethod("CreateFile", SrcFilePath, KeyFieldName, KeepLink) Table 76 describes the arguments for the CreateFile method. UsageBefore you call the CreateFile method, call the NewRecord method to make sure Siebel CRM creates a new business component record. Used WithTo use this method, you can use a BusComp.InvokeMethod call with the following interfaces:
ExamplesThe following example is in Siebel VB: Dim RetValue as String 'Instantiate fileBC as the appropriate attachment business component fileBC.NewRecord NewAfter The following example is in Siebel eScript: // Instantiate fileBC as the appropriate attachment business component fileBC.NewRecord(NewAfter); The following example is in COM Data Control: Dim errCode as Integer 'Instantiate fileBC as the appropriate attachment business component Args(0) = "C:\Demo\Image.bmp" fileBC.NewRecord NewAfter, errCode GenerateProposal Method for a Business ComponentTo 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. FormatTo 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 77 describes the arguments for the GenerateProposal method. Used WithTo use this method, you can use a BusComp.InvokeMethod call with the following interfaces:
GetFile Method for a Business ComponentThe 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:
FormatBusComp.InvokeMethod("GetFile", KeyFieldName) Table 78 describes the arguments for the GetFile method.
Usage for the GetFile MethodThe 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 WithTo use this method, you can use a BusComp.InvokeMethod call with the following interfaces:
ExamplesThe following example uses Siebel VB: Dim RetValue as String '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: // 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 'Instantiate fileBC as the appropriate attachment business component 'Query for the required attachment record Args = "AccntFileName" PutFile Method for a Business ComponentThe PutFile method updates a file in the Siebel file system with a newer file. This method returns one of the following values: FormatBusComp.InvokeMethod("PutFile", SrcFilePath, KeyFieldName) Table 79 describes the arguments for the PutFile method. UsageUsage 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 WithTo use this method, you can use a BusComp.InvokeMethod call with the following interfaces:
ExamplesThe following example uses Siebel VB: Dim RetValue as String '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") The following example uses Siebel eScript: // 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"); The following example uses COM Data Control: Dim errCode as Integer 'Instantiate fileBC to the appropriate attachment business component 'Query for the attachment record to be updated Args(0) = "C:\Demo\Image.bmp" RefreshBusComp Method for a Business ComponentThe 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. FormatBusComp.InvokeMethod("RefreshBusComp") Used WithTo use this method, you can use a BusComp.InvokeMethod call with the following interfaces:
This method only works with a business component that uses the CSSBCBase class. RefreshRecord Method for a Business ComponentThe 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. FormatretVal = BusComp.InvokeMethod("RefreshRecord") Used WithTo use this method, you can use a BusComp.InvokeMethod call with the following interfaces:
This method only works with a business component that uses the CSSBCBase class. SetAdminMode Method for a Business ComponentThe 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. FormatBusComp.InvokeMethod("SetAdminMode", flag) Table 80 describes the arguments for the SetAdminMode method. Used WithTo use this method, you can use a BusComp.InvokeMethod call with the following interfaces: |
Siebel Object Interfaces Reference | Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |