Versions Compared

Key

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


4- Work Business Object Commands 

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)

Tek bir kaydın belirli kriterlere göre getirilmesini sağlar. Kaydın tüm alanlarını, varsa ek tablo alanlarını getirir.

Get komutu sonucunda dönen bilgiler bir sonuç değişkenine atanır. Eğer değişken belirtilmediyse, @@ ile başlayan ilgili kayıt nesnesine atanır. Bu durumda (yani komut tek parametreyle kullanıldığında), komutun kullanıldığı nesneye bağlı olarak, ilgili başka aktif nesneler de hafızada boş ya da farklı ise doldurulur. (Örneğin, @@Item ile birlikte @@ItemUnit nesnesi doldurulur.)

Bir nesne için Get komutu kullanıldığında hangi nesnelerin otomatik olarak doldurulduğu aşağıda gösterilmiştir.

Filtre metni için SQL notasyonu kullanılır. Filtre yerine kaydın Id bilgisi yazılabilirIt 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ş 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

NesneObject.New

({"alan1field1" :

"değer1value1", "alan2field2

: "değer2value2"} 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

NesneObject.Set

({"alan1field1" :

"değer1value1", "alan2field2"

: "değer2value2"})

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

NesneObject.Save()

Save komutu hafızada hazırlanmış olan nesneyi veritabanına kaydeder.

Bu komut kaydetme sırasında gerekli kontrolleri yapar. Nesnenin ilişkili olduğu diğer nesneler (Slip nesnesi için Warehouse nesnesi gibi) hafızaya yüklenmiş durumdaysa o nesnelerden Id bilgilerini alarak kayda ekler. Bu sebeple, bir nesne kaydedilmeden önce, daha önceden hafızaya alınmış ama kullanılmayacak nesnelerin ResetVariables komutuyla temizlenmesi gerekirThe 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

NesneObject.Generate

(nesneye göre

parametreler)

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 yapabilir.

Planlama oluşturma: PlanningSlip.Generate(kaynak liste türü, kaynak sipariş listesi ya da sipariş satır listesi) 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ş-153, Sipariş satırları-154 (v1.2 den itibaren)

Emir oluşturma: 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ış, 3-Transfer (v1.2 den itibaren)

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

Taşıma kabı oluşturmaparameters 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": "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. 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 @siparisler@orders.rows)
PlanningSlip.Generate(154,
@siparissatirlari@orderlines.rows)

WorkOrder.Generate(153, 1, @siparisler@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
RunKullanıcı tanımlı iş kurallarını script içinden çalıştırmak için kullanılır. Henüz kullanıma açılmamıştır.

...


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

You can view the matrix of the command usage by objects at Business objects where commands are used.


Related objects specified automatically with Get command

...

Object Name

Model Name

Objects specified automatically with Get command

Address

Address

Warehouse, WarehouseFloor, WarehouseZone, WarehouseBlock

Address Material Link

AddressItem Warehouse, Address, Item, ItemUnit


ERP Company Definitions

ErpFirm

Erp, Warehouse

Factories

Factory

Division

Materials

Item

ItemUnit, malzeme varyant ise Item+ItemVariant if the material is a variant

Material Content

ItemContent

Item, ItemUnit

Material Parameters

ItemParameter

Warehouse, Item

Serial/Lot Information

ItemTracking

Item, ItemUnit

Material Units

ItemUnit

Item

Orders

OrderSlip

Warehouse, Warehouse2, Arp, DeliveryArp, ShipmentAddress, Carrier, SalesPerson, Vehicle, Project

Order Lines

OrderSlipLine

Warehouse, Item, ItemUnit, Arp, Project, Department, Department2, Division2, Factory2

Planning Slips

PlanningSlip

Warehouse, Warehouse2, Arp, DeliveryArp, ShipmentAddress, Carrier, SalesPerson, Vehicle, Driver, Project

Planning Slip Lines 

PlanningSlipLine

Warehouse, Address, Item, ItemUnit, Arp, Project, AssignedUser, Department, Department2, Division2, Factory2, OrderSlip,OrderSlipLine

Production Orders 

ProductionOrder

Item, ItemUnit, Arp, Project, Factory

Production Work Orders 

ProductionOrderLine

Item, ItemUnit, Factory

Reservation Slips

ReservationSlip

Warehouse, Department, Division, Factory, OrderSlip, PlanningSlip, ProductionOrder, WorkOrder

Reservation Slip Lines

ReservationSlipLine

Address, Container, ChildContainer

Sevkiyat AdresleriShipment Addresses

Shipment Address

Arp

Shipment Days

Shipment Day

Arp/ShipmentAddress

Stock Slips

Slip

Warehouse, Warehouse2, Department, Division, Factory, Department2, Division2, Factory2, Arp, DeliveryArp, ShipmentAddress, Carrier, SalesPerson, Vehicle, Driver, Project, CustomSlipType, OrderSlip, PlanningSlip, ProductionOrder, WorkOrder

Stock Slip Lines

SlipLine

Warehouse, Address, Address2, Item, ItemUnit, Arp, Project, AssignedUser, Department, Division, Factory, Department2, Division2,Factory2, OrderSlipLine, PlanningSlipLine, ProductionOrderLine, WorkOrderLine, Container, ChildContainer

Material Unit Codes

UnitBarcode

Item, ItemUnit, varsa if any, ItemVariant

Vehicles

Vehicle

Warehouse

Warehouses

Warehouse

Department, Division, Factory

Order Slips

WorkOrder

Warehouse, Warehouse2, Department, Division, Factory, Department2, Division2, Factory2, Arp, DeliveryArp, ShipmentAddress,SalesPerson, Vehicle, Driver, Project, OrderSlip, PlanningSlip, ProductionOrder

Order Slip Lines

WorkOrderLine

Warehouse, Warehouse2, Address, Address2, Item, ItemUnit, Arp, Project, AssignedUser, Department, Division, Factory, Department2, Division2, Factory2, OrderSlipLine, PlanningSlipLine, ProductionOrderLine, Container, ChildContainer

...