you can read on
http://www.artofcreation.be/2011/08/22/ax2012-sysoperation-part-1-data-contracts-and-service-operations/
Senin, 25 Juli 2016
Minggu, 24 Juli 2016
AX : Enabled Dissabled button di form List Page AX 2012
cara nya lihat di properti form ada interaction class..nah itu adalah class untuk mengatur disabled enabled button
(contoh itu di class purchtablelistpageinteracion)
(contoh itu di class purchtablelistpageinteracion)
Kamis, 14 Juli 2016
AX : Name and Table ID AX 2012
http://microsoft-dynamics-ax-erp.blogspot.co.id/2012/04/name-and-id-of-tables_13.html
AX : Unmarked Settlement AX 2012
Un-mark transactions marked for settlement
Scenario:
-
If you go to Vendors>>Functions>>Open transactions editing you can identify transactions that have been marked for settlement by the red hand in he "Is marked" column. Un-marking these transactions works only by finding the offset transaction and deleting the link from there.
Issue:
-
I came across transactions that have been identified as marked, however I did not know where the transactions are marked. The marking was created in one case because an update conflict occurred in the payment journal which cause the processing of the payment, casing the marked offset transaction to be lost but the transaction to be settled remained marked; in another case I think someone started to create a credit adjustment note, but deleted the credit adjustment before completing however the marking remained.
Investigation:
- In the open transactions editing form (Vendors>>Functions>>Open transactions editing or Customers>>Functions>>Open transactions editing) and find the problematic transaction.
- Go to Inquiries>>Specification and research the offset transactions. Try to un-mark the transaction with traditional means (i.e. Function>>Open transactions editing on the sales order etc.)
- If you find a problem an want to continue with removing the marking then right click on the record in "Open transactions editing", select "Record info">>"Show all fields" and make a note of the Record-Id.
-
The next step must be done in the AOT using the table browser to directly access the data of certain tables. This is dangerous and definitely not good practice. However I do not know better and would appreciate if someone could show me how to do it better.
-
The table SpecTrans contains all transactions marked for settlement. Find th record-id you previously made a note of in the column RefRecId.
-
Delete the found SpecTrans record to remove the marking.
Better solutions?
If you have a cleaner and better solution, please tell me how you do it?
Thank you
Thomas
Kamis, 30 Juni 2016
IT : Cara untuk melakukan format flashdisk FAT32 ke NTFS
1. Klik kanan pada My Computer, dan klik Manage
2. Klik pada Device Manager dan kemudian pilih Disk Drive seperti pada gambar di bawah :
3. Klik kanan pada USB Drive yang dipilih dan klik Properties. Klik pada tab Policies, Anda akan mendapatkan 2 pilihan yaitu "Optimize for quick removal" dan "Optimize for performance". Pilih pilihan kedia yaitu "Optimize for performance" (jika pengguna windows xp, vista dan 7) jika anda pengguna windows 8 dan windows 10 pilihlah yang Better Performance.
4. Klik Ok dan menuju ke My Computer. Klik kanan pada drive di My Computer dan polih Format. Pada File System pilih format NTFS dan klik start untuk memulai.
5. Selesai
Selasa, 28 Juni 2016
AX : Contoh Lain Query SUM di AX 2012
public void executeQuery()
{
Query query,queryline;
QueryRun qr, qrAPInvoice;
QueryBuildDataSource queryBuildDataSource,querylinesource;
//QueryBuildFieldList qbfl = queryBuildDataSource.fields();
QueryBuildRange queryBuildRange,queryrangeline;
// QueryBuildFieldList qbfl = queryBuildDataSource.fields();
Common common;
str recIds;
PurchDP_Header argsRecord;
LedgerJournalTrans ldjt;
//this.query().dataSourceNo(1).clearRanges();
// Get all the markupTrans recIds for the
// sales header and lines.
argsRecord = element.args().record();
recIds = argsRecord.Nomor_PurchDP;
query = new Query();
queryBuildDataSource = query.addDataSource(tableNum(LedgerJournalTrans));
queryBuildRange = queryBuildDataSource.addRange(fieldNum(LedgerJournalTrans,Nomor_DP));
// If no RecIds for markupTrans are associated with the sales order, passing in an empty
// string was causing there to be no filter on recId and returning all records.
if(recIds)
{
queryBuildRange.value(queryValue(recIds));
// PurchDP_Header_ds.object(fieldNum(PurchDP_Header, VendorAccount)).allowEdit(false);
}
else
{
queryBuildRange.value(SysQuery::valueEmptyString());
}
//QBFL SUM
queryBuildDataSource.addSelectionField(fieldNum(LedgerJournalTrans,AmountCurDebit),SelectionField::Sum);
queryBuildDataSource.addSelectionField(fieldNum(LedgerJournalTrans,AmountCurCredit),SelectionField::Sum);
queryBuildDataSource.addSortField(fieldnum(LedgerJournalTrans,journalnum));
queryBuildDataSource.addSortField(fieldnum(LedgerJournalTrans,voucher));
queryBuildDataSource.addSortField(fieldnum(LedgerJournalTrans,nomor_dp));
queryBuildDataSource.addSortField(fieldnum(LedgerJournalTrans,nomor_pa));
queryBuildDataSource.addSortField(fieldnum(LedgerJournalTrans,amountdp));
queryBuildDataSource.orderMode(OrderMode::GroupBy);
qr = new QueryRun(query);
while (qr.next())
{
ldjt = qr.get(tableNum(LedgerJournalTrans));
LedgerJournalTransTemp.clear();
LedgerJournalTransTemp.Nomor_DP = ldjt.Nomor_DP;
LedgerJournalTransTemp.Nomor_PA = ldjt.Nomor_PA;
LedgerJournalTransTemp.Voucher = ldjt.Voucher;
LedgerJournalTransTemp.JournalNum = ldjt.JournalNum;
LedgerJournalTransTemp.AmountCurDebit = ldjt.AmountCurDebit;
LedgerJournalTransTemp.AmountCurCredit = ldjt.AmountCurCredit;
LedgerJournalTransTemp.AmountDP = ldjt.AmountDP;
LedgerJournalTransTemp.insert();
}
super();
}
{
Query query,queryline;
QueryRun qr, qrAPInvoice;
QueryBuildDataSource queryBuildDataSource,querylinesource;
//QueryBuildFieldList qbfl = queryBuildDataSource.fields();
QueryBuildRange queryBuildRange,queryrangeline;
// QueryBuildFieldList qbfl = queryBuildDataSource.fields();
Common common;
str recIds;
PurchDP_Header argsRecord;
LedgerJournalTrans ldjt;
//this.query().dataSourceNo(1).clearRanges();
// Get all the markupTrans recIds for the
// sales header and lines.
argsRecord = element.args().record();
recIds = argsRecord.Nomor_PurchDP;
query = new Query();
queryBuildDataSource = query.addDataSource(tableNum(LedgerJournalTrans));
queryBuildRange = queryBuildDataSource.addRange(fieldNum(LedgerJournalTrans,Nomor_DP));
// If no RecIds for markupTrans are associated with the sales order, passing in an empty
// string was causing there to be no filter on recId and returning all records.
if(recIds)
{
queryBuildRange.value(queryValue(recIds));
// PurchDP_Header_ds.object(fieldNum(PurchDP_Header, VendorAccount)).allowEdit(false);
}
else
{
queryBuildRange.value(SysQuery::valueEmptyString());
}
//QBFL SUM
queryBuildDataSource.addSelectionField(fieldNum(LedgerJournalTrans,AmountCurDebit),SelectionField::Sum);
queryBuildDataSource.addSelectionField(fieldNum(LedgerJournalTrans,AmountCurCredit),SelectionField::Sum);
queryBuildDataSource.addSortField(fieldnum(LedgerJournalTrans,journalnum));
queryBuildDataSource.addSortField(fieldnum(LedgerJournalTrans,voucher));
queryBuildDataSource.addSortField(fieldnum(LedgerJournalTrans,nomor_dp));
queryBuildDataSource.addSortField(fieldnum(LedgerJournalTrans,nomor_pa));
queryBuildDataSource.addSortField(fieldnum(LedgerJournalTrans,amountdp));
queryBuildDataSource.orderMode(OrderMode::GroupBy);
qr = new QueryRun(query);
while (qr.next())
{
ldjt = qr.get(tableNum(LedgerJournalTrans));
LedgerJournalTransTemp.clear();
LedgerJournalTransTemp.Nomor_DP = ldjt.Nomor_DP;
LedgerJournalTransTemp.Nomor_PA = ldjt.Nomor_PA;
LedgerJournalTransTemp.Voucher = ldjt.Voucher;
LedgerJournalTransTemp.JournalNum = ldjt.JournalNum;
LedgerJournalTransTemp.AmountCurDebit = ldjt.AmountCurDebit;
LedgerJournalTransTemp.AmountCurCredit = ldjt.AmountCurCredit;
LedgerJournalTransTemp.AmountDP = ldjt.AmountDP;
LedgerJournalTransTemp.insert();
}
super();
}
AX : Sum di AX 2012
You can use the following code:
QueryBuildFieldList qbfl = qbds.fields();
qbds = q.addDataSource(tablenum(SalesLine));
//QBFL
qbfl.addField(fieldNum(SalesLine,SalesQty),SelectionField::Sum);
qbds.addSortField(fieldnum(SalesLine,ItemId));
qbds.orderMode(OrderMode::GroupBy);
qr = new QueryRun(q);
while(qr.next())
{
salesLine = qr.get(tablenum(SalesLine));
info(strfmt('Item Id =%1, Qty = %2',salesLine.ItemId,salesLine.SalesQty));
}
QueryBuildFieldList qbfl = qbds.fields();
qbds = q.addDataSource(tablenum(SalesLine));
//QBFL
qbfl.addField(fieldNum(SalesLine,SalesQty),SelectionField::Sum);
qbds.addSortField(fieldnum(SalesLine,ItemId));
qbds.orderMode(OrderMode::GroupBy);
qr = new QueryRun(q);
while(qr.next())
{
salesLine = qr.get(tablenum(SalesLine));
info(strfmt('Item Id =%1, Qty = %2',salesLine.ItemId,salesLine.SalesQty));
}
Langganan:
Postingan (Atom)



