crmTech/ September 18, 2015/ Siebel/ 0 comments

If there need to fetch the logs for below mentioned business service, copy below code. Compile Business Service. Logs will get created in Logs folder.

  • Row Set Transformation Toolkit
  • Remote Complex Object Instance Service
  • Pricing Manager
  • EAI Siebel Adapter

PreInvoke Method

//------------------------------------------------------------- 
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
 {
 PropertySetToFile(Inputs, "..\\LOG\\RowSetInputs.log", ("Inputs to: " + MethodName));
 return (ContinueOperation);
 }
 function PropertySetToFile (PropSet, fileName, title)
 {
 var file = Clib.fopen(fileName, "at");
 LogData(("\n---------------------------------------------------"), file);
 LogData(("Start Process  " + Clib.asctime(Clib.gmtime(Clib.time()))), file);
 LogData(title, file);
 LogData("PROVIDED PROPERTY SET", file);
 WritePropertySet(PropSet, file, 0);
 Clib.fclose(file);
 return (CancelOperation);
 }
//------------------------------------------------------------------
 function WritePropertySet(PropSet, file, Level)
 {
 if ((Level == "") || (typeof(Level) == "undefined"))
 {
 Level = 0;
 }
 var indent = "";
 for (var x = 0; x < Level; x++)
 {
 indent += "\t";
 }
 var psType = PropSet.GetType();
 var psValue = PropSet.GetValue();
 LogData((indent + "Type: " + psType + " Value: " + psValue), file);
 var propName = PropSet.GetFirstProperty();
 while (propName != "")
 {
 var propValue = PropSet.GetProperty(propName);
 LogData((indent + propName + " = " + propValue), file);
 propName = PropSet.GetNextProperty();
 }
 var children = PropSet.GetChildCount();
 for (var x = 0; x < children; x++)
 {
 LogData(( indent + "CHILD PROPERTY SET " + x), file);
 WritePropertySet(PropSet.GetChild(x), file, (Level + 1));
 }
 }

//------------------------------------------------------------------
 function LogData(DataString, file)
 {
 try
 {
 Clib.fputs((DataString + "\n"), file);
 Clib.fflush(file);
 }
 catch (e)
 {
 // no action
 }
 }

Invoke Method

function Service_InvokeMethod (MethodName, Inputs, Outputs)
 {
 PropertySetToFile(Outputs, "..\\LOG\\RowSetOutputs.log", ("Outputs from: " + MethodName));
 }
Advertisements
Share this Post

About crmTech

Sharad is working from more than 11 years in IT industry. He has giving his technical services in CRM for telecom, automobile, retail, finance industry in Sales, Service and Marketing. He has primary skill in Siebel and Salesforce Marketing Cloud. Apart from this he has worked in Google Cloud, Wordpress blogging, SEO optimization, Short film making, mobile apps creation,logo design creation for his own interest.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.