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 inventTable;
CST_ItemSubMaster cST_ItemSubMaster;
next insert();
if(this.CST_ParentItemId != this.ItemNumber)
{
cST_ItemSubMaster.ParentItem = this.CST_ParentItemId;
cST_ItemSubMaster.ChildItem = this.ItemNumber;
cST_ItemSubMaster.insert();
}
}
public boolean validateWrite()
{
InventTable inventTable;
CST_ItemSubMaster cST_ItemSubMaster;
boolean ret = next validateWrite();
EcoResReleasedProductV2Entity ecoResReleasedProductV2Entity = this;
if(this.ItemNumber == this.CST_ParentItemId )
{
ret = checkFailed("@Costco:ParentChildItemError");
}
return ret;
}
}
Comments
Post a Comment