Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

function WebApplet_PreInvokeMethod (MethodName)

if(MethodName=="mytest")

//var loginuser= TheApplication().LoginName();

var myPS = TheApplication().NewPropertySet();

with(myPS)

SetProperty("A","TECHIESHUB");

SetProperty("B",TheApplication().LoginName());

test(myPS);

return(CancelOperation);
}

return (ContinueOperation);

function test(X)

try{

var A = X.GetProperty("A");

var B = X.GetProperty("B");

var currBO = this.BusObject().Name();

var currBC = this.BusComp();

var currAppletname = this.Name();

var currBCname = this.BusComp().Name();


var sAreaVal = currBC.GetFieldValue("INS Area");

var srtype = currBC.GetFieldValue("Service Request Type");

var status = currBC.GetFieldValue("Status");

if(srtype=="External" && status=="Open")

currBC.SetFieldValue("Service Country","India");

//currBC.WriteRecord();

// throw("I am Manchala throwing my exception ");

//TheApplication().RaiseErrorText("AppletName is:"+currAppletname+" BC
Name is:"+currBCname+" BO Name is:"+currBO+" Area Value is:"+sAreaVal+ "A
is:"+A+" B is:"+B);

}catch(e)

throw(e);

finally

//nullificaion work

currBO=currAppletname=null;

You might also like