I checked the Event viewer and found that the log file was full:
Object Server 01: The database reported (session 1 (-AOS-)): [Microsoft][SQL Server Native Client 10.0][SQL Server]The transaction log for database
'AXDatabase' is full due to 'LOG_BACKUP'. . The SQL statement was: "UPDATE SQLSYSTEMVARIABLES SET VALUE='34' WHERE PARM='SYSVARID'"
Solution:
Stop the AOS.
Shrink database log file and start the AOS.
2016-03-21
2016-03-20
[AX2012] Enable/Disable Buttons on PurchTable or SalesTable Form by Code
To enable or disable buttons on PurchTableListPage, PurchTable, SalesTableListPage or SalesTable form, you can edit on these classes:
These class can affect PurchTableListPage or SalesTableListPage forms.
- PurchTableListPageInteraction
- PurchTableInteraction
- PurchTableInteractionHelper
- SalesTableListPageInteraction
- SalesTableInteraction
- SalesTableInteractionHelper
These class can affect PurchTableListPage or SalesTableListPage forms.
2016-03-17
[AX2012] QR Code
Here is the sample to generate QR Code in AX 2012. This code can be used for report by save the binData.getData() into container field in report temporary table. You can download the xpo here.
public class FormRun extends ObjectRun
{
Microsoft.Dynamics.QRCode.Encoder qrCode;
System.Drawing.Bitmap netBitmap;
BinData binData;
Image image;
}
public void init()
{
super();
qrCode = new Microsoft.Dynamics.QRCode.Encoder();
qrCode.set_Version(40);
qrCode.set_ErrorCorrectionLevel(Microsoft.Dynamics.QRCode.ErrorCorrectionLevel::High); binData = new BinData();
image = new Image();
}
void createQR()
{
Filename filename;
FileIOPermission perm = null;
;
netBitmap = qrCode.Encode(Text.text());
filename = qrCode.GetTempFile(Text.text());
perm = new FileIOPermission(filename, 'RW');
perm.assert();
binData.loadFile(filename);
image.setData(binData.getData());//binData.getData() return a container
QRImage.image(image);
if(WinAPI::fileExists(filename))
{
WinAPI::deleteFile(filename);
}
CodeAccessPermission::revertAssert();
//info(filename);
}
public void textChange()
{
super();
element.createQR();
}
public class FormRun extends ObjectRun
{
Microsoft.Dynamics.QRCode.Encoder qrCode;
System.Drawing.Bitmap netBitmap;
BinData binData;
Image image;
}
public void init()
{
super();
qrCode = new Microsoft.Dynamics.QRCode.Encoder();
qrCode.set_Version(40);
qrCode.set_ErrorCorrectionLevel(Microsoft.Dynamics.QRCode.ErrorCorrectionLevel::High); binData = new BinData();
image = new Image();
}
void createQR()
{
Filename filename;
FileIOPermission perm = null;
;
netBitmap = qrCode.Encode(Text.text());
filename = qrCode.GetTempFile(Text.text());
perm = new FileIOPermission(filename, 'RW');
perm.assert();
binData.loadFile(filename);
image.setData(binData.getData());//binData.getData() return a container
QRImage.image(image);
if(WinAPI::fileExists(filename))
{
WinAPI::deleteFile(filename);
}
CodeAccessPermission::revertAssert();
//info(filename);
}
public void textChange()
{
super();
element.createQR();
}
2016-03-16
[AX2012] SSRS Report Error at The Fisrt Time After Restarting AOS
"The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type ‘System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′ failed. (rsRuntimeErrorInExpression)"
Solution:
- Go to System administration>Setup>System>System service accounts.
- Retype the business connector proxy account ("domain\username").
2012-12-14
[AX2012] "Microsoft Dynamics AX 2012 for Developer" in Compiled HTMLFormat (.chm)
"Not work on Windows 10"
Dokumen Help "Microsoft Dynamics AX 2012 for Developer" dalam bentuk file .chm bisa di unduh di tautan berikut:
"Microsoft Dynamics AX 2012 for Developer" help file in compiled format (.chm) can be downloaded below:
Google:
Microsoft Dynamics AX 2012 for Developer.chm
Dropbox:
Microsoft Dynamics AX 2012 for Developer.chm
Dokumen Help "Microsoft Dynamics AX 2012 for Developer" dalam bentuk file .chm bisa di unduh di tautan berikut:
"Microsoft Dynamics AX 2012 for Developer" help file in compiled format (.chm) can be downloaded below:
Google:
Microsoft Dynamics AX 2012 for Developer.chm
Dropbox:
Microsoft Dynamics AX 2012 for Developer.chm
2012-03-31
[AX2009] Export Import User Group Security
Export security setting dari current AOS:
- Administration»Periodic
- Data export/import
- Fokus ke Definition groups
- Input Definition group.
- Input Definition group name.
- Pilih Standard sebagai Type nya.
- Klick Options tab
- Cek "Include system tables" checkbox (system tables).
- Klik tombol Table setup.
- Masukkan daftar tabel:
- AccessRightsList* - menyimpan security permissions untuk User groups
- UserGroupInfo* - menyimpan User groups
- DomainInfo* - menyimpan Domains
- UserGroupList - menyimpan anggota User group
- UserInfo - menyimpan User AX
- SysUserInfo - menyimpan User AX setting.
- CompanyDomainList - menyimpan keterhubungan company/domain
- Klik tombol Export to.
- Pilih lokasi, nama, dan simpan filenya (.dat).
- OK
- Administration»Periodic
- Buka Data export/import
- Pilih Import
- Pilih Definition group atau kosongkan saja.
- Pilih file .dat yang sudah diexport td.
- Ok
2012-03-16
Function monthDiff
Mencari rentang/jumlah bulan dari suatu periode. Masih mencari function terbaik.
int monthDiff(TransDate _fromDate, TransDate _toDate)
{
TransDate fromDate = _fromDate, toDate = _toDate;
int yrDiff;
int totalMonth;
int fdtDay = dayofmth(fromDate);
//int tdtDay = dayofmth(toDate);
int frMth = mthofyr(fromDate);
int toMth = mthofyr(toDate);
int countMth;
int fYear = year(fromDate), tYear = year(toDate);
date procDt;
;
yrDiff = yearDiff(toDate, fromDate);
countMth = frMth;
totalMonth = 0;
if(!yrDiff)
{
while(fYear<=tYear)
{
while(countMth<=12)
{
if((fYear == tYear) && (countMth == toMth))
break;
countMth++;
totalMonth++;
}
fYear++;
countMth = 1;
}
}
else
{
tYear = tYear - yrDiff;
while(fYear<=tYear)
{
while(countMth<=12)
{
if((fYear == tYear) && (countMth == toMth))
break;
countMth++;
totalMonth++;
}
fYear++;
countMth = 1;
}
totalMonth += (12 * yrDiff);
}
procDt = mkdate(fdtDay,toMth,fYear-1);
if(!(dayofmth(procDt)<fdtDay))
procDt--;
if(toDate<(procDt))
totalMonth--;
fYear = year(fromDate);
if(fYear == tYear && frMth == toMth && fromDate == dateStartMth(fromDate) && toDate == dateEndMth(toDate))
totalMonth++;
return totalMonth;
}
Subscribe to:
Posts (Atom)

