Beruflich Dokumente
Kultur Dokumente
Agenda
• Possible Solutions
• Design Time Decisions
• Declarative Alternatives
• Optimization Techniques
• Release 7.8 and 8.0 Enhancements
• Question and Answer
• Possible Solutions
• Design Time Decisions
• Declarative Alternatives
• Optimization Techniques
• Release 7.8 and 8.0 Enhancements
• Question and Answer
• Possible Solutions
• Design Time Decisions
• Declarative Alternatives
• Optimization Techniques
• Release 7.8 and 8.0 Enhancements
• Question and Answer
• Possible Solutions
• Design Time Decisions
• Declarative Alternatives
• Optimization Techniques
• Release 7.8 and 8.0 Enhancements
• Question and Answer
‘SetFieldValue event
if (fieldname == “Product Serialized Flag”)
{
if(this.GetFieldValue(“Serial Number”) == “”
&& this.GetFieldValue(“Product Serialized Flag”) == ‘Y’)
{
this.SetFieldValue(“Serial Number”, this.GetFieldValue(“Asset
Number”));
}
}
function BusComp_WriteRecord()
{
if(this.GetFieldValue(“Account Status”) == “Followup”)
{
var bc =
TheApplication().GetBusObject(“Action”).GetBusComp(“Action”);
bc.NewRecord(NewAfter);
bc.SetFieldValue(“Description”, “Account Followup”);
bc.SetFieldValue(“Due”, Today());
bc.WriteRecord();
}
}
• Runtime Events
• Bigger complement of events than available in script
function
Applet_PreCanInvokeMethod(MethodName,&CanInvoke)
{
if(MethodName == “Submit”)
{
CanInvoke = “TRUE”;
return(CancelOperation);
}
}
User Properties
• Required
• Named Method to invoke a Bus Service
• Configuring Data-Driven Read-Only Behavior
• State Model
• Possible Solutions
• Design Time Decisions
• Declarative Alternatives
• Optimization Techniques
• Release 7.8 and 8.0 Enhancements
• Question and Answer
• In Release 2000, there were a few legitimate uses for this event. In
Release 7, we have yet to see a necessity for using the event.
bcOrder.ExecuteQuery( ForwardOnly );
if ( bcOrder.FirstRecord() )
{
do {
…
bcOrderLineItems.ExecuteQuery(ForwardOnly);
…
}
while ( bcOrder.NextRecord() );
}
Example:
bc.SetSearchSpec(Name, theName);
bc.SetSearchSpec(CustomField, theField);
bc.SetSearchSpec(SomethingElse, theElse);
• Possible Solutions
• Design Time Decisions
• Declarative Alternatives
• Optimization Techniques
• Release 7.8 and 8.0 Enhancements
• Question and Answer
• Release 7.x:
• BrowserScript and ServerScript
• Release 8.0:
• Enhancements to the ST eScript Engine
• Enhancements in Tools Configuration to assist and reduce scripting
CPU reduction
• 18-20% reduction in CPU usage per user in heavily OM dependent
script scenarios (100 connected users)
• 25-35% reduction in CPU usage per user in low OM dependent script
scenarios (100 connected users)
• Late Binding:
var a = new Date ();
a.toString();
• Early Binding:
var a : Date = new Date ();
a.toString();
• Script Libraries
• Can call business service functions directly after declaring a
business service. No need to declare property sets and make
an InvokeMethod call.
• Modular, reusable, upgradeable components can now be written.
• Use is optional: All code written prior to 8.x is still supported
• Fix and Go