Thursday, 6 February 2014

Update Record on Line from Header with conditions (Never , Prompt, Always)

public boolean modified()
{
boolean ret;
InventTransferTable inventTransferTable1;
InventTransferLine inventTransferLine1;
TradeTable2LineUpdate TradeTable2LineUpdate;
InventParameters inventParameters;
str dlvmode;
DialogButton diagBut;
str strMessage = “Update in Line”;
str strTitle = “Prompt”;
;
ret = super();
select firstonly inventParameters;
if(inventParameters.TradeTable2LineUpdate == TradeTable2LineUpdate::Always)
{
dlvmode = this.valueStr();
select forUpdate inventTransferLine1 where inventTransferLine1.TransferId == Identification_TransferId.valueStr();
inventTransferLine1.DlvModeId = dlvmode;
inventTransferLine1.update();
inventTransferLine_ds.research();
}
if(inventParameters.TradeTable2LineUpdate == TradeTable2LineUpdate::Prompt)
{
diagBut = Box::yesNoCancel(
strMessage,
DialogButton::No,
strTitle);
if (diagBut == DialogButton::Yes)
{
dlvmode = this.valueStr();
select forUpdate inventTransferLine1 where inventTransferLine1.TransferId == Identification_TransferId.valueStr();
inventTransferLine1.DlvModeId = dlvmode;
inventTransferLine1.update();
inventTransferLine_ds.research();
}
else
{
info(” Record Not updated”);
}
}
return ret;
}

No comments:

Post a Comment