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",

@cariListe@AR/APList)

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

PopupView(@cariListe@AR/APList.rows,

{"title":"Cari ListesiAR/AP List","fields":

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

Title|AdıName|50|L"]},@secim@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='@malzeme@material' OR

Name='@malzeme@material'")


Slip.Get(1) // 1 nolu fiş getirilir

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


@@Warehouse2) // 20 kodlu depo

bilgisi getirilir @@Warehouse2

nesnesine atanır.

1.0

New

Object.New

({"field1" :

"value1", "field2" 

: "value2"} 1/0)

Bu komut, yanına belirlenen alanları json dizisi formatında parametre olarak alır ve ilgili değerleri kullanarak yeni bir kayıt oluşturur. Oluşan kayıt aktif nesneye kaydedilir.

Komutun ikinci parametresi oluşturulan kaydın veritabanına kaydedilip kaydedilmeyeceğini belirler. (0-Kaydetme, 1-Kaydet) İkinci parametre yazılmaması halinde varsayılan olarak 0 değeri kullanılırThis 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"})

Set komutu, yanına belirlenen alanları json dizisi formatında parametre olarak alır ve ilgili değerleri aktif nesneye kaydeder.

Nesnenin başka tablolarla ilişkilerini belirleyen referans alanları (Slip nesnesi için WarehouseId gibi) bu komutla güncellenemez. Bu tür bağlantılar için Get komutu kullanılarak (Warehouse.Get gibi) nesne hafızaya yüklenmelidir.

Parametre olarak @ ile başlayan (aynı yapıya sahip) bir nesne verilirse, o nesneyi aktif nesne olarak belirler.

Bu komut veritabanına kayıt yazmaz. Sadece hafızadaki aktif nesne güncellenir. Veritabanına kaydetmek için bu komuttan sonra Save komutunun kullanılması gerekirThe 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)

Fiş kayıtlarını toplu olarak oluşturmayı sağlar. Kullanıldığı nesneye göre yapısı değişiklik gösterir. Nesneye göre tek bir kayıttan ya da birden çok kayıttan toplu oluşturma işlemi yapabilirIt 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.

Planlama oluşturma: PlanningSlip.Generate(kaynak liste türü, kaynak sipariş listesi ya da sipariş satır listesisource list type, source order list or order line list) OrderSlip.List komutundan dönen sipariş listesinin satırlarından ya da OrderSlipLine.List komutundan dönen listeyle bir planlama kaydı oluşturur.

Kaynak liste türü: SiparişSource list type: Order-153, Sipariş satırlarıOrder lines-154 (from v1.2 den itibaren)

Emir oluşturmaCreating orders: WorkOrder.Generate(kaynak fiş türü, hedef işlem türü, kaynak sipariş/planlama listesi)

Kaynak fiş türü: Sipariş-153, Planlama-155

Hedef işlem türü: 1-Giriş, 2-Çıkış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 den itibaren)

Stok fişi oluşturmaCreating stock slip: Slip.Generate(emir fişi nesnesiorder slip object) Eğer hiç emir fişi nesnesi verilmezse, hafızadaki aktif emir nesnesinden (@@WorkOrder) stok fişi oluşturulur.

Taşıma kabı oluşturmaCreating container: Container.Generate({"count": "oluşturulacak etiket sayısınumber of tags to be generated"}) İsteğe bağlı olarak count değişkeninden sonra Container nesnesinin alanları da (Description gibi) yazılabilir. Yazılan alanın değeri dolu olarak kaydedilecektir. Bu komut kullanılmadan önce mutlaka ContainerType.Get nesnesiyle ilgili taşıma kabı türü hafızaya yüklenmelidir. İstenirse, oluşturulan taşıma kabı fişlerde hedef taşıma kabına (@@Container2) atanabilir.

Generate komutu çalıştırıldığında sonuç olarak oluşan nesne otomatik olarak hafızaya yüklenir. Örneğin, Slip.Generate komutundan sonra @@Slip nesnesi dolar.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 @siparisler@orders.rows)
PlanningSlip.Generate(154,
@siparissatirlari@orderlines.rows)

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

Slip.Generate(@emir)
Slip.Generate()
Container.Generate({"Count":"1"})
Container.Generate({"Count":"1","
Description":"örnek"})
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.

Komutların nesnelere göre kullanım matrisini Komutların kullanıldığı iş nesneleri sayfasından inceleyebilirsinizYou can view the matrix of the command usage by objects at Business objects where commands are used.


Related objects specified automatically with Get command

...