Bu kod size yardımcı olur.
query.recordLevelSecurity(false);
https://daxapta.wordpress.com/2015/12/14/kayit-duzeyi-ve-musteri-limiti/
static void MAA_CreatedBy(Args _args)
{
PurchTable PurchTable;
while select forUpdate PurchTable
where PurchTable.createdBy == "maakb4545"
if(PurchTable.RecId)
{
ttsBegin;
New OverwriteSystemfieldsPermission().assert();
PurchTable.overwriteSystemfields(true);
PurchTable.(fieldNum(PurchTable, CreatedBy)) = "makbl";
PurchTable.doUpdate();
ttsCommit;
}
CodeAccessPErmission::revertAssert();
info("bitti");
}
Bu kod çalıştığında; aşağıdaki hatayı veriyor.UPDATE PURCHTABLE SET CREATEDBY='makbl' where CREATEDBY='maakb'
public void displayOption(Common _common, FormRowDisplayOption _options)
{
PurchLine purchLineLocal;
int backColor = WinAPI::RGB2int(255, 50, 50);
int textColor = WinAPI::RGB2int(255, 255, 255);
;
purchLineLocal = _common;
if(EtgExImpPurchLineTrans::findLastETA(purchLineLocal.InventTransId) > purchLineLocal.DeliveryDate) // buradaki şart sağlandığında o satırlar kırmızı renkte görünecek.
{
_options.backColor(backColor);
_options.textColor(textColor);
}
else
{
_options.clearBackColor();
_options.clearTextColor();
}
super(_common,_options);
}
Form aşağıdaki gibi görünür.
static void MAA_FieldName(Args _args)
{
SysDictField dict;
str label;
;
dict = new SysDictField(tablenum(SalesTable), fieldNum(SalesTable, InvoiceAccount));
label = dict.label();
info(strfmt("%1", label));
}
public void init()
{
super();
SalesLine.ETGReasonCode = "DBTS-01";
}
Talep edilen sevk tarihini forma eklediğimde benim karşılaştığım sorun; sabit bir tarih geliyor(31.015.2015) gibi, bu alana yeni tarih girileceği için boş gelmesi gerekiyor.public void init()
{
super();
SalesLine.ETGReasonCode = "DBTS-01";
SalesLine.ShippingDateRequested = datenull(); // init'e yeni eklediğimiz kısım
}
void clicked()
{
super();
element.updateGCBNo();
}
void updateGCBNo()
{
Dialog d = new Dialog(strfmt("%1 için GCB No düzenle", ATMDisTicHead.ATMDisTicID)); // üzerinde bulunan ihracat ref noyu formun başlığında gösterir
DialogField dlgETGGCBNo;
DialogGroup dlgGroup;
ATMDisTicHead DisTicHead;
;
dlgGroup = d.addGroup("Düzenle");
dlgGroup.widthMode(FormWidth::ColumnWidth);
dlgETGGCBNo = d.addField(typeid(ETGGCBNo), DisTicHead.ETGGCBNo, "GCB No");
dlgETGGCBNo.value(AtmDisTicHead.ETGGCBNo);
d.run();
{
if (d.closedOk())
{
{
ttsbegin;
if ( AtmDisTicHead )
{
AtmDisTicHead.selectForUpdate(true);
AtmDisTicHead.ETGGCBNo = dlgETGGCBNo.value();
AtmDisTicHead.doUpdate();
}
ttscommit;
ATMDisTicHead_ds.research(true);
}
}
}
}
void clicked()
{
super();
element.updateBankNegInstRecipient();
}
void updateBankNegInstRecipient()
{
Dialog d = new Dialog("Faiz Oranı & Vade Tarihi düzenle");
DialogField dlgBankNegInstRecipientName;
DialogField dlgDueDate;
DialogGroup dlgGroup;
LedgerJournalTrans ledgerJournalTrans;
;
dlgGroup = d.addGroup("Düzenle");
dlgGroup.widthMode(FormWidth::ColumnWidth);
dlgBankNegInstRecipientName = d.addField(typeid(BankNegInstRecipientName), "Faiz Oranı");
dlgBankNegInstRecipientName.value(DRTLedgerJournalTrans.BankNegInstRecipientName);
dlgDueDate = d.addField(typeid(DueDate), "Vade Tarihi");
dlgDueDate.value(DRTLedgerJournalTrans.Due);
d.run();
{
if (d.closedOk())
{
{
ttsbegin;
ledgerJournalTrans=ledgerJournalTrans::findRecId(DRTLedgerJournalTrans.TransRecId, true);
if ( ledgerJournalTrans )
{
ledgerJournalTrans.BankNegInstRecipientName = dlgBankNegInstRecipientName.value();
ledgerJournalTrans.Due = dlgDueDate.value();
ledgerJournalTrans.doUpdate();
}
ttscommit;
DRTLedgerJournalTrans_ds.research(true);
}
}
}
}
public void jumpRef()
{
CustTable custTableMainTable;
Args args;
MenuFunction menuFunction;
;
args = new Args();
args.caller(element);
args.lookupfield(FieldNum(CustTable,AccountNum));
args.lookupValue(ETGCollateralTable.AccountNum);
menuFunction = new MenuFunction(MenuItemDisplayStr(custTable),MenuItemType::Display);
menuFunction.run(args);
}
static void MAA_SalesTableTotal(Args _args) { SalesTable SalesTable; utcDateTime dateTime; dateTime ...