EDIT AND DISPLAY METHODS IN AX 2012
EDIT METHOD:
Edit CustAccount custItemGroupId(boolean _set , CustAccount _custItemGroupId)
{
CustTable custTable;
;
if(_set)
{
if(_custItemGroupId)
{
ttsbegin;
custTable = CustTable::find(this.ID,true);
// this mention our Table and ID is our field
custTable.AccountNum = _custItemGroupId;
custTable.update();
ttscommit;
}
}
else
{
_custItemGroupId = CustTable::find(this.ID).AccountNum;
}
return _custItemGroupId;
}
DISPLAY METHOD
Display CustAccount custItemGroupId1 ()
{
CustTable custTable;
;
return CustTable::find(this.ID).AccountNum;
}
EDIT METHOD:
Edit CustAccount custItemGroupId(boolean _set , CustAccount _custItemGroupId)
{
CustTable custTable;
;
if(_set)
{
if(_custItemGroupId)
{
ttsbegin;
custTable = CustTable::find(this.ID,true);
// this mention our Table and ID is our field
custTable.AccountNum = _custItemGroupId;
custTable.update();
ttscommit;
}
}
else
{
_custItemGroupId = CustTable::find(this.ID).AccountNum;
}
return _custItemGroupId;
}
DISPLAY METHOD
Display CustAccount custItemGroupId1 ()
{
CustTable custTable;
;
return CustTable::find(this.ID).AccountNum;
}
No comments:
Post a Comment