Tuesday 15 October 2019

Update Records in Siebel Scripts - Chat UI Business Service

Hello All,

Whenever we require to update a record we use Inbound Email Database Operations Business Service, but this BS has a major limitation if there are no records matching the search Specification it throws an error which is not desirable and requires us additional error handling.

Query Using Inbound Email Database Operations,





var sBusService = TheAppliation().GetService("Inbound E-mail Database Operations");
var Inputs = TheAppliation().NewPropertySet();
var Outputs = TheAppliation().NewPropertySet();
Inputs.SetProperty("BusComp", "Order Entry - Line Items");
Inputs.SetProperty("BusObj", "Order Entry (Sales)");
Inputs.SetProperty("QueryFields", "Id");
Inputs.SetProperty("Id",Order_Item_Id);
Inputs.SetProperty("ValueFields", "Order Header Id");
Outputs =  sBusService.InvokeMethod("FindRecord",Inputs);                                   




error returned , 

No record matching the search specification is found.(SBL-CMI-00122)



The Alternative ,

Chat UI Business Service's FindRecord method, this uses the same inputs and does not return any error in case no records are found.
syntax:



var sBusService = TheAppliation().GetService("Chat UI Business Service");
var Inputs = TheAppliation().NewPropertySet();
var Outputs = TheAppliation().NewPropertySet();
Inputs.SetProperty("BusObj", "Order Entry (Sales)");
Inputs.SetProperty("BusComp", "FS Invoice");
Inputs.SetProperty("QueryFields","Order Id");
Inputs.SetProperty("Order Id", "1-3B39B13S_1");
Inputs.SetProperty("ValueFields","Invoice Number");`
Outputs =  sBusService.InvokeMethod("FindRecord",Inputs);                                               

No comments:

Post a Comment

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...