Siebel Tools Error |
Script compilation failed at line 36 in procedure 'BusComp_WriteRecord':This is one of the compile time error which can waste a lot of time, the worst thing about this error is that it does not indicate the actual problem and point to unrelated section of the code.
Syntax error at Line 368 position 35:Expected '}'
(SBL-SCR-00128)
This error can occur because of multiple reasons, and can force developer to check the whole code. Some of tips that one can use to resolve this error are:
- Check for Semicolons(;) after end of every statement in script. It is possible to leave assignment statement without semicolons.
- Go to last updated script of the object and try to find syntax errors line by line.
- Verify all if statements, all must have at least single statement to execute if condition is true.
- Verify all for and while loops and make sure all have some exit clause.
This error can also come in another form for IP2014:
SBL-SCR-00128 : Not All Control Paths Lead To A Return Statement
It is easily resolvable by unchecking the Deduce Type scripting option flag in Siebel Tools, read more here.
Hope it helps.
Hi Team,
ReplyDeleteCan anyone find out the syntax error in this code:
function DelResp()
{
/************************************
Set Responsibility and Employee Status
for already Terminated users
************************************/
try
{
var tEmpBO = TheApplication().GetBusObject("Employee");
var tEmpBC = tEmpBO.GetBusComp("Employee");
var rCnt;
with (tEmpBC)
{
InvokeMethod("SetAdminMode", "TRUE");
SetViewMode(AllView);
ClearToQuery();
ActivateField ("Responsibility");
ActivateField ("Termination Date");
ActivateField("Employment Status");
SetSearchSpec("Termination Date","IS NOT NULL");
ExecuteQuery();
rCnt= CountRecords();
if (FirstRecord())
{
var RespMVG = GetMVGBusComp("Responsibility");
// Set Responsibility to Empty
with (RespMVG)
{
InvokeMethod("SetAdminMode", "TRUE");
SetViewMode(AllView);
ClearToQuery();
ExecuteQuery();
while (FirstRecord())
{
DeleteRecord();
}
}
SetFieldValue ("Employment Status","Terminated");
WriteRecord();
}
}
}
cache (e)
{
TheApplication().RaiseErrorText("Error: " + e.toString());
}
finally
{
return (rCnt);
}
}
Hi Anonymous,
ReplyDeleteYou have wrong spelling of catch block. It should not be cache