Internal Store Requisition Module in Dynamics AX 2009
void clicked()
{
InventJournalTable _InventJournalTable;
InventJournalTrans InventJournalTrans;
EmplName _EmplName
;
super();
if(InventJournalTable.EmplId != '')
{
error("Requisition Already Submitted");
}
else
{
if (InventJournalTable.NumOfLines != 0)
{
ttsbegin;
_EmplName = DirPartyTable::find(EmplTable::find(syscompanyuserinfo::current().EmplId).PartyId).Name;
info(_EmplName);
update_recordset _InventJournalTable setting IRStatus = 1,EmplId = syscompanyuserinfo::current().EmplId,CreatedDate = Today(),
CreatedName = _EmplName where _InventJournalTable.JournalId == InventJournalTable.JournalId
&& _InventJournalTable.IRStatus == 0 && InventJournalTable.ReqId != '' ;
_InventJournalTable.reread();
update_recordset InventJournalTrans setting counted = InventJournalTrans.Qty where InventJournalTrans.JournalId == InventJournalTable.JournalId;
ttscommit;
element.dataSource().research();
}
else
{
info('Please Enter Items in Lines before submit.');
}
}
}
{
InventJournalTable _InventJournalTable;
InventJournalTrans InventJournalTrans;
EmplName _EmplName
;
super();
if(InventJournalTable.EmplId != '')
{
error("Requisition Already Submitted");
}
else
{
if (InventJournalTable.NumOfLines != 0)
{
ttsbegin;
_EmplName = DirPartyTable::find(EmplTable::find(syscompanyuserinfo::current().EmplId).PartyId).Name;
info(_EmplName);
update_recordset _InventJournalTable setting IRStatus = 1,EmplId = syscompanyuserinfo::current().EmplId,CreatedDate = Today(),
CreatedName = _EmplName where _InventJournalTable.JournalId == InventJournalTable.JournalId
&& _InventJournalTable.IRStatus == 0 && InventJournalTable.ReqId != '' ;
_InventJournalTable.reread();
update_recordset InventJournalTrans setting counted = InventJournalTrans.Qty where InventJournalTrans.JournalId == InventJournalTable.JournalId;
ttscommit;
element.dataSource().research();
}
else
{
info('Please Enter Items in Lines before submit.');
}
}
}
Comments
Post a Comment