Versions Compared

Key

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

...

Code Block
// This operation reads and fills in the @@Warehouse, @@WarehouseFloor, @@WarehouseZone, @@WarehouseBlock objects from the database along with the @@Address object.
Address.Get("Address='@AdresBarkod@AddressBarcode'")
 
// This operation only fills the @Address object with the address information read from the database.
Address.Get("Address='@AdresBarkod@AddressBarcode'",@Adres@Address)

All objects in the script are global. Once it is filled in, it stays filled unless it is reset or filled by another command. To avoid saving errors, you should reset the variables to affect the operation before the operation.

...

You can call the frequently performed operations by transferring them to a common public form, and you can make your script shorter and compacter.

Code Block
Set(@YetkiKodu@AuthorizationCode, "GIRISENTRY") // Assigning the authorization code to use for the address to the variable
CallForm(AdresListeleSecListSelectAddress) //  Calling the address selection form
If(@AdresSecimSonucu @AddressSelectionResult= -1,Goto(BasaDon)) //  Redirecting the script if the wrong result is returned from the form
 
BeginForm(AdresListeleSecListSelectAddress) // CommonPublic address selection form
    Set(@AdresSecimSonucu@AddressSelectionResult, 0) // Resetting result variable
    Address.List("AuthCode='@YetkiKodu@AuthorizationCode'","",@AdresListesi@AddressList)
    If(@AdresListesi@AddressList.rowCount<1)
        ShowMessage({"title":"UYARIWARNING","message":"TanımlıNo AdresAddress BulunamadıDefined","buttons":"TAMAMOK"},@Secenek@Option)
        Set(@AdresSecimSonucu@AddressSelectionResult, -1) // Incorrect result variable
    Else()
        If(@AdresListesi@AddressList.rowCount = 1) // TekIf adresthere varsais direkt @@Address değişkenine atanıyoronly one address, it is assigned directly to the @@Address variable
             Address.Get(@AdresListesi@AddressList.rows.1.Id) 
        Else() // BirdenIf çokthere adresare varsamore listedenthan seçipone yaptırılıyoraddress, it is selected from the list
            PopupView(@AdresListesi@AddressList.rows,{"mode":"list","title":"KabulAcceptance AdresAddress ListesiList","fields":["Address|AdresAddress TanımıDefinition|15|L"]},@sira@order)
            Address.Get(@AdresListesi@AddressList.rows.@sira@order.Id)
        EndIf()
    EndIf()
    ReturnForm() // BuReturning formuto çağıranthe satıraline gerithat dönülüyorcalled this form
EndForm()

Sık kullandığınız sabitleri bir kez tanımlayıp, scriptin her yerinde kullanabilirsinizYou can define your favorites once and use them everywhere in the script.

Code Block
// Set komutucommand JSONsupports yapısındavariable değişkenassignment atamasınıin desteklerJSON structure.
Set(@EmirDurum@OrderStatus, {"BekliyorPending":12,"IslemeAlindiProcessing":13, "TamamlandiCompleted":14})
 
// EmirThe statüsüorder tamamlandıstatus olarak belirleniyor. JSON nesnelerin alt nesnelerine . (nokta) ile erişilebiliris set as completed. The sub-objects of JSON objects can be accessed with . (dot).
CustomState.Get(@EmirDurum@OrderStatus.Tamamlandi)

...

Completed)

Do not use SQL command to fill in objects from the database unless necessary. The List and Get commands retrieve data by performing many checks, including permissions.

Code Block
// KullanıcınınIt yetkisi olduğu-olmadığı, aktif firmaya ait olan-olmayan, kullanımda olan-olmayan bütün depoları getirirretrieves both the active and inactive warehouses of both the active and inactive company, whether it is authorized by that user.
Sql("SELECT * FROM SysWarehouse", @Depolar@Warehouses)
 
// SadeceIt aktifretrieves firmayaonly ait,the kullanımdaactive olanwarehouses veof othe kullanıcınınactive yetkisicompany, olanwhich depoları getiriris authorized by that user.
Warehouse.List("","", @Depolar)

...

@Warehouses)

Do not use SQL commands for database update operations unless necessary. The Save command performs many checks while saving.

Code Block
// FişUpdates statüsünüthe Entegreslip Edildistatus olarakas güncellerIntegrated amabut entegrasyonu tetiklemezdoes not trigger the integration.
Sql("UPDATE Slip SET StateId=19", @sonuc@result)
 
// FişUpdates statüsünüthe Entegreslip Edildistatus olarakas güncellerIntegrated veand ointegrates statününinto otomatikERP eylemias olarakan ERP'yeautomatic entegreaction olmasınıof sağlarthat status.
CustomState.Get(19)
Slip.Save()