<< Previous in series Next in series >>
Practical Example:
Here is the usage of all the constructs in an example
function BusComp_PreWriteRecord ()
{
try
{
var BO = TheApplication().ActiveBusObject();
var BC = BO.GetBusComp(“Action”);
//we are working on Active BO so BC will have context of the current record so no need to query.
var sActiveFlag = this.GetFieldValue("Active");
if (sActiveFlag == 'Y')
{
this.SetFieldValue("Status","Submitted");
BC.SetFieldValue(“Status”,”Done”);
}
}
catch(e)
{
throw(e);
}
finally
{
BC = BO = null;
}
}


O comments at "try catch finally and throw - Part 3"
Comment Now!