Assume that your class gets data from various tables.
CustVendVoucher -> initCustVendTrans method
...
fieldid = fieldName2Id(common.TableId,'Payment');
if (fieldid)
{
custVendTrans.Payment = common.(fieldid); // You must create mappings
}
....
13 Ağustos 2010 Cuma
Using fieldid & fieldname to set value
Etiketler:
ax2009,
axapta,
dynamics Ax,
fieldid,
fieldname2id
AX2009 How to get XML from site using proxy
xml TNC_getXML()
{
System.Net.HttpWebResponse httpresponse;
System.Net.WebRequest webrequest;
System.Net.WebResponse webResponse;
System.Net.HttpWebRequest httprequest;
System.Net.IWebProxy proxy;
System.Net.WebPermission webPermission;
System.IO.Stream stream;
System.IO.StreamReader streamreader;
System.Text.Encoding encoding;
xml xml;
interopPermission interopPermission;
int i;
interopPermission = new InteropPermission(InteropKind::ClrInterop);
InteropPermission.assert();
try
{
webrequest = System.Net.WebRequest::Create("../../...xml");
proxy = System.Net.WebRequest::GetSystemWebProxy();
proxy.set_Credentials(System.Net.CredentialCache::get_DefaultCredentials());
webRequest.set_Proxy(proxy);
httpresponse = webRequest.GetResponse();
stream = httpresponse.GetResponseStream();
streamreader = new System.IO.StreamReader(stream);
xml = streamreader.ReadToEnd();
codeAccessPermission::revertAssert();
}
catch
{
error("Connection Error");
}
}
{
System.Net.HttpWebResponse httpresponse;
System.Net.WebRequest webrequest;
System.Net.WebResponse webResponse;
System.Net.HttpWebRequest httprequest;
System.Net.IWebProxy proxy;
System.Net.WebPermission webPermission;
System.IO.Stream stream;
System.IO.StreamReader streamreader;
System.Text.Encoding encoding;
xml xml;
interopPermission interopPermission;
int i;
interopPermission = new InteropPermission(InteropKind::ClrInterop);
InteropPermission.assert();
try
{
webrequest = System.Net.WebRequest::Create("../../...xml");
proxy = System.Net.WebRequest::GetSystemWebProxy();
proxy.set_Credentials(System.Net.CredentialCache::get_DefaultCredentials());
webRequest.set_Proxy(proxy);
httpresponse = webRequest.GetResponse();
stream = httpresponse.GetResponseStream();
streamreader = new System.IO.StreamReader(stream);
xml = streamreader.ReadToEnd();
codeAccessPermission::revertAssert();
}
catch
{
error("Connection Error");
}
}
Etiketler:
ax2009,
Axatpa,
code,
httprequest,
permission,
webrequest,
xml
Ax2009 Update object properties on AOT
static void tnc_updateTableLog(Args _args)
{
TreeNode aNode = TreeNode::findNode('\\Data Dictionary\\Tables').AOTfirstChild();
int i;
#Properties
str tproperties;
;
while (aNode)
{
tproperties = anode.AOTgetProperties();
tproperties = setproperty(tproperties, #PropertyCreatedBy,'Yes');
anode.AOTsetProperties(tproperties);
anode.AOTsave();
info(anode.AOTname());
aNode = aNode.AOTnextSibling();
i++;
// if (i>10) break;
}
}
{
TreeNode aNode = TreeNode::findNode('\\Data Dictionary\\Tables').AOTfirstChild();
int i;
#Properties
str tproperties;
;
while (aNode)
{
tproperties = anode.AOTgetProperties();
tproperties = setproperty(tproperties, #PropertyCreatedBy,'Yes');
anode.AOTsetProperties(tproperties);
anode.AOTsave();
info(anode.AOTname());
aNode = aNode.AOTnextSibling();
i++;
// if (i>10) break;
}
}
Ax conditional values on query range
Field name can be used in the range expression :
SysQuery::findOrCreateRange(this.query().dataSourceName(identifierstr(CustTrans)),fieldnum(CustTrans,SettleAmountCur)).value('(SettleAmountCur < AmountCur)');
SysQuery::findOrCreateRange(this.query().dataSourceName(identifierstr(CustTrans)),fieldnum(CustTrans,SettleAmountCur)).value('(SettleAmountCur < AmountCur)');
27 Mayıs 2010 Perşembe
27 Nisan 2010 Salı
Ax2009 How to get Enum Label
dictEnum = new dictEnum(dictionary.enumName2Id('ENUMNAME'));
info(strfmt("Enum Label: %1", dictEnum.label() ));
info(strfmt("Enum item Lable:%1", dictEnum.value2Label(VALUE) ));
info(strfmt("Enum Label: %1", dictEnum.label() ));
info(strfmt("Enum item Lable:%1", dictEnum.value2Label(VALUE) ));
6 Şubat 2010 Cumartesi
Ax2009 SSRS Report edit Error in VS 2008
If u get the error "Invalid URI: The format of the URI could not be determined " while editing Ax2009 SSRS reports in Visual Studio 2008 for the first time on Win 7, just check the "C:\Users\tunca\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup " folder exists with admin rights.
Thanks to Bala Murugan , saved my huge time...
Thanks to Bala Murugan , saved my huge time...
3 Ocak 2010 Pazar
Project Gemini
OLAP için arayüzmü arıyorsunuz.
MS Office 2010 u bekleyin.
Project Gemini hayli tatminkar bir kullanım vaadediyor...
MS Office 2010 u bekleyin.
Project Gemini hayli tatminkar bir kullanım vaadediyor...
Win2008 Server + SQL Server 2008 , Ax 2009 Reporting Service , Analysis Service kurulum hatası
Ax2009 u MS SQL2008 Server üzerinde kurarken Reporting Service kurulumunda
SQL Server 2005 SP2 or higher is required
hatası veriyor. Bu hatayı geçmek için
Ax2009 dosyaları DVD den bir klasöre kopyalanmalı
Ax2009 SP1 Setup -> Support -> AXSetupResources -> Microsoft.Dynamics.Setup. ReportingServices.dll dosyası
AX2009 Setup -> Msi -> Components32 -> Program Files -> Microsoft Dynamics AX -> 50-> Setup
ve
AX2009 Setup -> Msi -> Components64 -> Program Files -> Microsoft Dynamics AX -> 50-> Setup
klasöründeki aynı isimli dosya ile değiştirilmeli.
OLAP küplerini deploy etmek için SQL 2005 Analysis assembly dosyalarına ihtiyaç var.
http://support.microsoft.com/kb/936081/en-us
SQL Server 2005 SP2 or higher is required
hatası veriyor. Bu hatayı geçmek için
Ax2009 dosyaları DVD den bir klasöre kopyalanmalı
Ax2009 SP1 Setup -> Support -> AXSetupResources -> Microsoft.Dynamics.Setup. ReportingServices.dll dosyası
AX2009 Setup -> Msi -> Components32 -> Program Files -> Microsoft Dynamics AX -> 50-> Setup
ve
AX2009 Setup -> Msi -> Components64 -> Program Files -> Microsoft Dynamics AX -> 50-> Setup
klasöründeki aynı isimli dosya ile değiştirilmeli.
OLAP küplerini deploy etmek için SQL 2005 Analysis assembly dosyalarına ihtiyaç var.
http://support.microsoft.com/kb/936081/en-us
Kaydol:
Kayıtlar (Atom)