Registering Methods to Make Sure Siebel Open UI Runs Them in the Correct Sequence
Siebel Mobile Disconnected uses a local database, which is a database that resides in the browser that stores the data that Siebel Open UI requires.
To register methods to make sure Siebel Open UI runs them in the correct sequence
On the client computer, use a JavaScript editor to open the file that includes the business service call that you must modify.
For more information, see Using Custom JavaScript Methods.
Locate the code that includes the business service call that you must modify.
You can use the ExecuteQuery and FirstRecord methods. Assume you locate the following code in Step 2:
business_service.prototype.Submit = function () { retObj = bc.ExecuteQuery(); err = retObj.err; if(!err){ retObj = bc.FirstRecord(); if(!retObj.err){ //Do an operation here that sets the return value to bRet return({err:false,retVal:bRet}); } } else{ SiebelApp.S_App.OfflineErrorObject.SetErrorMsg("messageKey", errParamArray); return({err:true}); } };
-
where business_service identifies the name of the business service that your custom code calls. For example, PharmaCallSubmitsvc.
For more information, see SetErrorMsg Method, FirstRecord Method and ExecuteQuery Method.
In this example, you replace the code that you located in Step 2 with the following code:
PharmaCallSubmitsvc.prototype.Submit = function () { var currRetValue={err:false}, retObj; retObj=bc.ExecuteQuery(); err = retObj.err; if(!err){ retObj=bc.FirstRecord(); if(!retObj.err){ //Do an operation here that sets the return value to bRet currRetValue={err:false,retVal:bRet}; } } else{ SiebelApp.S_App.OfflineErrorObject.SetErrorMsg("messageKey", errParamArray); currRetValue={err:true}; } return currRetValue; };
-