Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Command

Usage

Description

Example

Version

List

Object.List(filter

text/ID,

sorting, result

variable)

It enables the records to be retrieved from the database according to certain criteria for the relevant object.

The List command can return single or multiple records. Records can be accessed starting from variable @result variable.rows.1. This command returns a maximum of 1000 lines of records.

Results are not automatically displayed on the screen. After this command, it will be required to use the PopupView or TableView command to display the list on the screen.

SQL notation is used for filtering and sorting.

Arp.List("Code LIKE 'P%'","Code",

@AR/APList)

If(@AR/APList.rowCount <> 0)

PopupView(@AR/APList.rows,

{"title":"AR/AP List","fields":

["Code|Code|15|L","

Title|Name|50|L"]},@selection)

EndIf()

1.0

Get

Object.Get(

filter

text

/ID, 

result

variable)

It enables a single record to be displayed according to certain criteria. It displays all fields of the record, and the additional table fields, if any.

The information returned as a result of the Get command is assigned to a result variable. If the variable is not specified, it is assigned to the related record object starting with @@.

In this case (when the command is used with a single parameter), the other related active objects are also filled in by the objects of the command if they are empty or different in the memory. (For example, the @@ItemUnit object is 1filled in with @@Item.)

It is shown below which objects are automatically filled in when the Get command is used for an object.

SQL notation is used for filter text. The Id information of the record can be written in the filter.

Item.Get("Code='@material' OR

Name='@material'")


Slip.Get(1) // 1 nolu fiş getirilirnumbered slip is displayed

Warehouse.Get("Code='20'",


@@Warehouse2) // 20 kodlu depo

bilgisi getirilir @@Warehouse2

nesnesine atanır.

coded warehouse information is displayed

It is assigned to the object @@Warehouse2

1.0

New

Object.New

({"field1" :

"value1", "field2" 

: "value2"} 1/0)

This command takes the specified fields as parameters in the JSON array format and creates a new record using the related values. The record is saved in the active object.

The second parameter of the command determines whether the created record will be saved in the database. (0-Do Not Save, 1-Save) If the second parameter is not written, the value 0 is used by default.

WorkOrder.New({"SlipType":"3"},1)

1.0

Set

Object.Set

({"field1" :

"value1", "field2"

: "value2"})

The Set command takes the specified fields as parameters in JSON array format and saves the related values in the active object.

Reference fields that determine the object relations with other tables (such as the WarehouseId for the Slip object) cannot be updated with this command. The object must be stored in the memory by using the Get command (such as Warehouse.Get) for such connections.

If an object starting with @ (with the same structure) is specified as a parameter, it determines that object as the active object.

This command does not add records to the database. Only the active object in memory is updated. To save to the database, the Save command must be used after this command.

SlipLine.Set({"Approval":1})

1.0

Save

Object.Save()

The Save command saves the object prepared in memory to the database.

This command performs the required checks during saving. If other objects related to the object (such as a Warehouse object for a Slip object) are loaded into memory, it gets the Id information from these objects and adds them to the record. For this reason, before an object is saved, objects that were previously stored in memory but will not be used must be reset with the ResetVariables command.

SlipLine.Save()

1.0

Generate

Object.Generate

(parameters by object)

It allows creating of the slip records in batch. Its structure varies according to the object it is used for. It can perform batch creation with a single record or multiple records according to the object.

Creating plans: PlanningSlip.Generate(source list type, source order list, or order line list) It creates a planning record with the list returned by the OrderSlipLine.List command or with the lines of the order list returned by the OrderSlip.List command.

Source list type: Order-153, Order lines-154 (from v1.2)

Creating orders: WorkOrder.Generate(source slip type, target transaction type, resource order/planning list)

Source slip type: Order-153, Planning-155

Target transaction type: 1-Input, 2-Output, 3-Transfer (from v1.2)

Creating stock slip: Slip.Generate(order slip object) If no order slip object is given, the stock slip is created with the active order object (@@WorkOrder) in memory.

Creating container: Container.Generate({"count": "number of tags to be generated"}) If desired, the fields of the Container object (such as Description) can be written after the count variable. The value of the field will be saved as filled. Before using this command, the container type related to the ContainerType.Get object must be added in memory. If desired, the created container can be assigned to the target container (@@Container2) in the slips.

When the Generate command is executed, the created object is automatically stored in memory. For example: After the Slip.Generate command, the @@Slip object is filled. 

PlanningSlip.Generate(153, 1.0 @orders.rows)
PlanningSlip.Generate(154,
@orderlines.rows)

WorkOrder.Generate(153, 1, @orders.rows) // giriş siparişi, giriş emri örneği input order, input order example
WorkOrder.Generate(154, 3,
@planlamalar@planning.rows) // giriş  input
planlamasıplanning, transfer emri order

Slip.Generate(@emir@order)
Slip.Generate()
Container.Generate({"Count":"1"})
Container.Generate({"Count":"1","
Description":"örnekexample"})
Container.Generate({"Count":"1"}, @@Container2)

1.0
Run
It is used to run user-defined business rules within the script. It has not been put into service.

...