--- title: "Lasernet Core Scripting Advice" slug: "scripting-advice" description: "Lasernet Core scripting advice." updated: 2026-10-06T10:18:20Z published: 2026-10-06T10:18:20Z canonical: "kb.lasernetgroup.com/scripting-advice" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt > Use this file to discover all available pages before exploring further. # Lasernet Core Scripting Advice **Applies to:** Lasernet Core 11 ### When you write or modify Lasernet Core scripting code, remember the following advice. ### Supply Parameter Values as the Expected Data Type The Lasernet Core 11 script engine expects method calls to pass parameters as the expected data type. For example, `job.setJobInfo` expects two String parameters. To set the value of a JobInfo called Name to 42: - Suitable: `job.setJobInfo("name", "42")` - Not suitable: `job.setJobInfo("name", 42)` Perform concatenation only with data of the correct type: - Suitable: `job.setJobInfo("name", job.getJobInfo("anotherName") + "42")` - Not suitable: `job.setJobInfo("name", job.getJobInfo("anotherName") + 42)` In some situations, you might need to manipulate values as one particular data type, but you must ultimately use the right data type for each parameter when you make the method call. The following example adds two numbers but ultimately supplies the resulting value as a String (as the method expects). `job.setJobInfo("name", (parseInt(job.getJobInfo("anotherName")) + 42).toString())` If you want to set a JobInfo with a ByteArray value, use the `.setJobInfoBinary` method. ### Do Not Pass Parameter Values to Convert.toString() If you need to convert a value to a String, do not use `Convert.toString()` with a parameter. Instead, use the following methods: - `Convert.numberToString(value: Number, format: string [optional])` - `Convert.dateToString(value: Date, format: string [optional])` ### Do Not Assign Values to Read-Only Properties If a script assigns a value to a read-only property, Lasernet Core 11 and later versions raise an error. This is a breaking change: earlier versions silently ignored the assignment. A property is read-only if its Access value is Read in the Lasernet Core scripting guide. For example, the `text` property of `CurrentRearrange` is read-only: - Suitable: `var text = CurrentRearrange.text;` - Not suitable: `CurrentRearrange.text = "Some new text";`