Automatic field values changed according to master

2019-08-29 11:36发布

I have two table WI_MachineDrawing and BOM. There is two common filed call RevNo and WI_MachineDrawngNumber. Now I want to do something when i alter Wi_MachineDrwawng filed RevNo then BOM RevNo should be modified according to WI_MachineDrawing RevNo field.

标签: axapta
1条回答
\"骚年 ilove
2楼-- · 2019-08-29 12:07

Override the modifiedField method on the table WI_MachineDrawing to update the field in BOM when RevNo changes:

public void modifiedField(fieldId _fieldId)
{
    BOM BOM;
    ;
    super(_fieldId);
    switch(_fieldId)
    {
        case fieldnum(WI_MachineDrawing, RevNo):
            update_recordset BOM 
                setting RevNo = this.RevNo
                where BOM.WI_MachineDrawingNumber = this.WI_MachineDrawingNumber;
            break;
    }
}
查看更多
登录 后发表回答