You are on page 1of 3

1) Custom Button enable..

function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)


{
if(MethodName == "Today")
{
CanInvoke = "True"
return(CancelOperation);
}
return (ContinueOperation);
}

2) if you click the custom button Create new record..

function WebApplet_PreInvokeMethod (MethodName)

if(MethodName == "Today")

var bc = this.BusComp();

bc.NewRecord(0);

bc.SetFieldValue("Name","ACcount Through Script");

//bc.WriteRecord();

return(CancelOperation);

return (ContinueOperation);

}
3) 3) if you click custom button get the count of records..

function WebApplet_PreInvokeMethod (MethodName)

if(MethodName == "Today")

//var bc = this.BusComp();

var count = this.BusComp().CountRecords();

TheApplication().RaiseErrorText(count);

return(CancelOperation);

return (ContinueOperation);

4) Count Records in Child BC…

function WebApplet_PreInvokeMethod (MethodName)

if(MethodName == "Today")

var bo = TheApplication().ActiveBusObject();

var Actionbc = bo.GetBusComp("Action");

var count = Actionbc.CountRecords();

TheApplication().RaiseErrorText(count);
return(CancelOperation);

return (ContinueOperation);

5) Get Child Counts Based on Some Condition…

You might also like