Posts

Showing posts from February, 2024

COC for data entity methods

  EcoResReleasedProductV2Entity entity Methods : insert, update,validatewrite [ExtensionOf(tableStr(EcoResReleasedProductV2Entity))] final class CST_EcoResReleasedProductV2_Extension {     public void update()     {         InventTable         inventTable;         CST_ItemSubMaster   cST_ItemSubMaster;            next update();         if(this.CST_ParentItemId != this.ItemNumber)         {             cST_ItemSubMaster.ParentItem = this.CST_ParentItemId;             cST_ItemSubMaster.ChildItem  = this.ItemNumber;             cST_ItemSubMaster.insert();         }     }     public void insert()     {         InventTable         inventT...

Table level Event Handlers

  ValidatedField Event Handler: [DataEventHandler(tableStr(InventTable), DataEventType::ValidatedField)]     public static void InventLocation_onValidatedField(Common sender, DataEventArgs e)     {         CST_ItemSubMaster cST_ItemSubMaster;         InventTable inventTable = sender as InventTable;         ValidateFieldEventArgs fieldArgs = e;         boolean ret;         switch(fieldArgs.parmFieldId())         {             case fieldNum(InventTable,CST_ParentItemId):                 select firstonly cST_ItemSubMaster where cST_ItemSubMaster.ChildItem == inventTable.CST_ParentItemId;                 if(cST_ItemSubMaster.ChildItem)                 {              ...