1.How BenSelect scripts work (60-second version)
- Scripts are written in JScript.NET — Microsoft's .NET flavor of JavaScript. It looks like JavaScript but has full access to .NET types (
DateTime,String.Format,Hashtable,ArrayList). - Every script receives one root object:
Event. Everything you need — the employee, dependents, the plan, the application in progress, coverages, the case — hangs offEvent. - A script "answers" by setting something on
Event:- most script types set
Event.Value(true/false, a number, a string); - some set specific properties instead (
Event.TotalPremium,Event.Application.DeductionOptionCode,Event.Action.EffectiveDate,Event.Record[...],Event.SkipRecord).
- most script types set
- When a script runs is decided by its script type, which is chosen where the script is attached (plan engine, question, report field, text bank). Picking the right type is half the job.