I am getting ReferenceError:Function expected SetSearchSpec can't call as a function for following s
function WebApplet_PreInvokeMethod (MethodName)
{
try
{
if ( MethodName == "Test" )
{
var a=10;
var Status = "";
var BC = this.BusComp().Name();
with (BC)
{
SetSearchSpec("Activity Id", "1-140RE");
if (FirstRecord())
{
Status = GetFieldValue("Status");
if(Status == "Unscheduled")
{
SetFieldValue("Comment","abc123");
return ("ContinueOperation");
}
else
{
return ("CancelOperation");
}
}
}
return ("ContinueOperation");
}
}
catch(e)
{
throw e;
}
}
I am using Siebel IP2018 version