Microsoft Dynamics AX etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Microsoft Dynamics AX etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
18 Şubat 2014 Salı
Get defaultDimension values from LedgerDimension
Hi AX coders,
When you need to get the default dimension values of ledger dimension you can simply use the code below.
DimensionDefaultingEngine class has a getLedgerDimensionSpecifiers method which returns dimensionAttribute recId and a container which holds : dimension display value, dimension attribute value recId and hash key of the dimension.
If you send true after ledgerDimension value return value skip the main account information.
container c;
Map map;
MapEnumerator me;
int i;
;
map = DimensionDefaultingEngine::getLedgerDimensionSpecifiers(5637147595);
me = Map.getEnumerator();
while (me.moveNext())
{
info(strFmt("%1",conPeek(me.currentValue(),1)));
}
Have a nice coding
Alper.
Etiketler:
AX,
AX 2012,
Ax2012,
Default dimension,
DefaultDimenion,
Dyanmics AX,
Dynamics AX 2012,
get defaultDimension from LedgerDimension,
Ledger Dimension,
LedgerDimension,
Microsoft Dynamics AX
18 Nisan 2013 Perşembe
Deploy all SSRS reports by one command
Hi All,
If you configure and set all parameters correct you can publis all SSRS reports by using ManagementShell.
If you cannot find your AX ManagementShell just check if you installed Management utilities.
After you opened the Shell just use this command Publish-AXReport -ReportName *
* stands for all reports you can filter SSRS reports by name.
Hope it helps,
Have a nice AXing.
If you configure and set all parameters correct you can publis all SSRS reports by using ManagementShell.
If you cannot find your AX ManagementShell just check if you installed Management utilities.
After you opened the Shell just use this command Publish-AXReport -ReportName *
* stands for all reports you can filter SSRS reports by name.
Hope it helps,
Have a nice AXing.
25 Mart 2013 Pazartesi
How to delete specified layer on AX 2012
Hi All,
In AX 2012 we can delete layer by using command prompt.
First open command prompt then navigate to AOS folder which has the layer you want to delete.
User axUtil command and specify layer and db parameters.
For example below command deletes usr layer on MicrosoftDynamicsAX database.
C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities>axutil delete /layer:usr /db:MicrosoftDynamicsAX
Have a nice day.
In AX 2012 we can delete layer by using command prompt.
First open command prompt then navigate to AOS folder which has the layer you want to delete.
User axUtil command and specify layer and db parameters.
For example below command deletes usr layer on MicrosoftDynamicsAX database.
C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities>axutil delete /layer:usr /db:MicrosoftDynamicsAX
Have a nice day.
21 Şubat 2013 Perşembe
Jump related record from Info
Hi All,
We use Info to inform our clients but when we want to jump to the related record we need to use SysInfoAction class.
Here is the example code :
info(
"Information want to give ","",SysInfoAction_TableField::newBuffer(TableName::find(TablePrimaryKey))
);
Have a nice AXing.
We use Info to inform our clients but when we want to jump to the related record we need to use SysInfoAction class.
Here is the example code :
info(
"Information want to give ","",SysInfoAction_TableField::newBuffer(TableName::find(TablePrimaryKey))
);
Have a nice AXing.
Etiketler:
AX,
Ax 2009,
AX 2012,
Info,
link,
Microsoft Dynamics AX,
newBuffer,
record,
related,
SysInfoAction
30 Ocak 2013 Çarşamba
AX 2012 development workspace freezes : Client consumes memory until crash
Hi All,
First of all this situation occurs if you have HP laptop and if you installed security tools from HP official site.
If you are having the same error when you open the development workspace and then click anywhere on development workspace and instantly client freezes and not respond until "out of memory " error.
You just need to open this folder : C:\Program Files (x86)\Hewlett-Packard\HP ProtectTools Security Manager\Bin\ and then rename the DpFbView.dll to anything.
Restart your computer that is it.
Hope it helps to resolve this freeze problem.
Have a nice coding,
Alper.
First of all this situation occurs if you have HP laptop and if you installed security tools from HP official site.
If you are having the same error when you open the development workspace and then click anywhere on development workspace and instantly client freezes and not respond until "out of memory " error.
You just need to open this folder : C:\Program Files (x86)\Hewlett-Packard\HP ProtectTools Security Manager\Bin\ and then rename the DpFbView.dll to anything.
Restart your computer that is it.
Hope it helps to resolve this freeze problem.
Have a nice coding,
Alper.
21 Kasım 2012 Çarşamba
Group by on lookup
Hi,
When we need to group by the query values on lookup we need to use parmUseLookupValue(false) method.
public void lookup()
{
SysTableLookup sysTableLookup;
Query q = new Query();
;
sysTableLookup = SysTableLookup::newParameters(tablenum(TableName),this);
q.addDataSource(tablenum(TableName)).orderMode(OrderMode::GroupBy);
q.dataSourceTable(tablenum(TableName)).addGroupByField(fieldnum(TableName,FieldName));
sysTableLookup.addLookupfield(fieldnum(TableName,FieldName));
sysTableLookup.parmUseLookupValue(false);
sysTableLookup.parmQuery(q);
sysTableLookup.performFormLookup();
}
Have a nice coding with AX.
When we need to group by the query values on lookup we need to use parmUseLookupValue(false) method.
public void lookup()
{
SysTableLookup sysTableLookup;
Query q = new Query();
;
sysTableLookup = SysTableLookup::newParameters(tablenum(TableName),this);
q.addDataSource(tablenum(TableName)).orderMode(OrderMode::GroupBy);
q.dataSourceTable(tablenum(TableName)).addGroupByField(fieldnum(TableName,FieldName));
sysTableLookup.addLookupfield(fieldnum(TableName,FieldName));
sysTableLookup.parmUseLookupValue(false);
sysTableLookup.parmQuery(q);
sysTableLookup.performFormLookup();
}
Have a nice coding with AX.
27 Temmuz 2012 Cuma
Flush .Net Business Connector Cahce
Hi,
When you edit some method on class in AX and then use it on BC you will notice .Net code uses the old method.
When you edit some method on class in AX and then use it on BC you will notice .Net code uses the old method.
You can restart IIS, AOS or both but this is not the best solution and not always solve our problem.
We just need to flush the AOD on AX side.
We will just write one line code to the .net application
Microsoft.Dynamics.BusinessConnectorNet.Axapta.CallStaticClassMethod(“SysFlushAOD”, “doFlush”);
You can use this code after Axapta logon and just before calling the static method.
Hope it helps,
Have a nice AXing,
Alper.
Etiketler:
.Net,
.net business,
.net business connector,
c#,
doFlush,
flush,
flush cache,
Microsoft,
Microsoft Dynamics AX,
Microsoft Dynamics AX 2009,
refresh,
refresh code,
renew,
renew code,
sysFlushAOD
26 Temmuz 2012 Perşembe
List all tables on AX / Tüm tabloları listeleme
Hi,
If you need to list all tables on AX you need to call Global::pickTable method it will return tablenum after that you can do whatever you want.
Example :
info(tableid2name(Global::pickTable()));
Happy AXing,
Alper.
/////////////////////////////////////
Merhaba,
AX üzerinde açılmış tüm tabloları listelemek istediğinizde yapmanız gereken tek şey Global sınıfının altındaki pickTable methodunu çağırmak. Bu method seçilen tablo adının id sini size geri dönüyor. Geri dönüş değerini aldıktan sonra istediğiniz gibi değeri kullanabilirsiniz.
Örnek
info(tableid2name(Global::pickTable()));
Bol AX lı günler,
Alper.
If you need to list all tables on AX you need to call Global::pickTable method it will return tablenum after that you can do whatever you want.
Example :
info(tableid2name(Global::pickTable()));
Happy AXing,
Alper.
/////////////////////////////////////
Merhaba,
AX üzerinde açılmış tüm tabloları listelemek istediğinizde yapmanız gereken tek şey Global sınıfının altındaki pickTable methodunu çağırmak. Bu method seçilen tablo adının id sini size geri dönüyor. Geri dönüş değerini aldıktan sonra istediğiniz gibi değeri kullanabilirsiniz.
Örnek
info(tableid2name(Global::pickTable()));
Bol AX lı günler,
Alper.
24 Temmuz 2012 Salı
Coloring grid lines or cells from code / Grid alan veya satırlarını kod ile renklendirme
Hi,
We can color up grid lines by using displayOption. On forms datasource expand methods click right mouse ,select overwirte function and select displayOption.
For code example open tuttorial_Form_displayOptions form
public void displayOption(Common _common, FormRowDisplayOption _options)
{
// here's the logic which derteminates the color for this row
// In this case it will random color the lines
if (_common.recId mod 3 ==0)
{
_options.backColor( WinAPI::RGB2int( 255,0,0 ));
}
super(_common,_options);
}
With this code example if recId's mod is equal to 3 it will paint the entire row to red. But if we want to paint only one cell individually we will use
_options.affectedElementsByControl(CustTable_Name.id());
As you can see we used affectedElementsByControl method to paint only sellected control.
Happy Axing.
Alper.
////////////////////////////////////////////////////////////////////
Merhabalar,
Form üzerindeki gridlerde istenilen koşula göre renklendirme yapmak istediğimizde form veri kaynağı üzerinde bulunan displayOption methodunu ezeceğiz.
Methodu ezmek için form un altında yer alan veri kaynağının methodlarını genişletip yöntemi geçersiz kıl ı seçtikten sonra açılan listeden displayOption ı seçiyoruz.
Örnek kod olarak tuttorial_Form_displayOptions formunu kullabiliriz.
public void displayOption(Common _common, FormRowDisplayOption _options)
{
// here's the logic which derteminates the color for this row
// In this case it will random color the lines
if (_common.recId mod 3 ==0)
{
_options.backColor( WinAPI::RGB2int( 255,0,0 ));
}
super(_common,_options);
}
Bu örnekte custtable ın RecId alanının değerinin mod 3 e göre değeri 0 olduğunda kayıdın bulunduğu satırı tümüyle kırmızıya boyuyor.
Eğer tüm satırı değilde sadece tek bir alanı boyamak istersek koda alttaki satırı eklememiz yeterli.
_options.affectedElementsByControl(CustTable_Name.id());
Bu şekilde affectedElementsByControl methodunu çağırarak boyama işleminin sadece parametre olarak gönderdiğimiz CustTable_Name.id() konrolü için geçerli olduğunu belirtiyoruz.
Mutlu AXlar,
Alper.
We can color up grid lines by using displayOption. On forms datasource expand methods click right mouse ,select overwirte function and select displayOption.
For code example open tuttorial_Form_displayOptions form
public void displayOption(Common _common, FormRowDisplayOption _options)
{
// here's the logic which derteminates the color for this row
// In this case it will random color the lines
if (_common.recId mod 3 ==0)
{
_options.backColor( WinAPI::RGB2int( 255,0,0 ));
}
super(_common,_options);
}
With this code example if recId's mod is equal to 3 it will paint the entire row to red. But if we want to paint only one cell individually we will use
_options.affectedElementsByControl(CustTable_Name.id());
As you can see we used affectedElementsByControl method to paint only sellected control.
Happy Axing.
Alper.
////////////////////////////////////////////////////////////////////
Merhabalar,
Form üzerindeki gridlerde istenilen koşula göre renklendirme yapmak istediğimizde form veri kaynağı üzerinde bulunan displayOption methodunu ezeceğiz.
Methodu ezmek için form un altında yer alan veri kaynağının methodlarını genişletip yöntemi geçersiz kıl ı seçtikten sonra açılan listeden displayOption ı seçiyoruz.
Örnek kod olarak tuttorial_Form_displayOptions formunu kullabiliriz.
public void displayOption(Common _common, FormRowDisplayOption _options)
{
// here's the logic which derteminates the color for this row
// In this case it will random color the lines
if (_common.recId mod 3 ==0)
{
_options.backColor( WinAPI::RGB2int( 255,0,0 ));
}
super(_common,_options);
}
Bu örnekte custtable ın RecId alanının değerinin mod 3 e göre değeri 0 olduğunda kayıdın bulunduğu satırı tümüyle kırmızıya boyuyor.
Eğer tüm satırı değilde sadece tek bir alanı boyamak istersek koda alttaki satırı eklememiz yeterli.
_options.affectedElementsByControl(CustTable_Name.id());
Bu şekilde affectedElementsByControl methodunu çağırarak boyama işleminin sadece parametre olarak gönderdiğimiz CustTable_Name.id() konrolü için geçerli olduğunu belirtiyoruz.
Mutlu AXlar,
Alper.
Kaydol:
Kayıtlar (Atom)


