Create Mandatory with message using x++ :
if (!CreditCardTable.Zipcode)
{
warning("Zipcode
must be filled in!");
ret = false;
}
public boolean fetch()
{
Query
_query = new
Query(this.query());
QueryRun
_queryRun;
boolean
ret;
;
//ret =
super();
parmTtd = dialogTtd.value();
if
(parmTtd == NoYes::No)
{
TtdImage.visible(false);
}
else
{
TtdImage.visible(true);
}
_query.dataSourceTable(tableNum(VendPurchOrderJour)).addRange(fieldNum(VendPurchOrderJour,
PurchId)).value(_vendPurchOrderJour.PurchId);
_query.dataSourceTable(tableNum(VendPurchOrderJour)).addRange(fieldNum(VendPurchOrderJour,
PurchTableVersion)).value(SysQuery::value(_vendPurchOrderJour.PurchTableVersion));
//_query.dataSourceTable(tableNum(PurchLineAllVersions)).addRange(fieldNum(PurchLineAllVersions,
ItemId)).value(SysQuery::value(_purchLineAllVersions.ItemId));
_queryRun = new
QueryRun(_query);
//rowNum = 1;
while
(_queryRun.next())
{
if
(_queryRun.changed(tableNum(VendPurchOrderJour)))
{
_vendPurchOrderJour =
_queryRun.get(tableNum(VendPurchOrderJour));
element.send(_vendPurchOrderJour);
Keterangan =
PurchParmTable::findPurchId(_vendPurchOrderJour.PurchId,
_vendPurchOrderJour.ParmId).TECKeterangan;
NoFax =
PurchParmTable::findPurchId(_vendPurchOrderJour.PurchId,
_vendPurchOrderJour.ParmId).TECNoFax;
Payment =
PurchTable::find(_vendPurchOrderJour.PurchId).Payment;
//totalQty
+= CorrectPackingSlip.CorrectionQty;
}
if
(_queryRun.changed(tableNum(PurchLineAllVersions)))
{
_purchLineAllVersions =
_queryRun.get(tableNum(PurchLineAllVersions));
if
(_purchLineAllVersions.ItemId != TMPItemId)
{
element.send(_purchLineAllVersions);
TMPItemId =
_purchLineAllVersions.ItemId;
}
}
//rowNum++;
}
if
(row < 10)
{
while
((10-row) != 0)
{
element.execute(1);
row++;
}
}
if
(row == 10)
{
element.execute(2);
element.newPage();
}
return
true;
}
0 comments:
Post a Comment