Thursday, March 31, 2011
Date Range in AOT Query from SSRS
Query:
How can I add date ranges in an AOT query linked to SSRS.
Answer:
Kindly use the following sample code to create a data method and then use it as a source for report data set.
[DataMethod(), AxSessionPermission(SecurityAction.Assert)]
public static DataTable GetData(DateTime fromDate, DateTime toDate)
{
DataTable table = new DataTable();
IDictionary
myRanges.Add("AOTTable.Date",
fromDate.ToString("dd/MM/yyyy") + ".." + toDate.ToString("dd/MM/yyyy"));
table = AxQuery.ExecuteQuery("select * from AOTQuery", myRanges);
return table;
}
Wednesday, March 30, 2011
Tuesday, March 29, 2011
SQL Padding Zeros, Pad / Trim Leading Zeros - SQLUSA
SQL Padding Zeros, Pad / Trim Leading Zeros - SQLUSA: "REPLACE(STR(ReorderPoint, 6), SPACE(1), '0')"
Monday, March 28, 2011
Dynamics AX 2009 Enterprise Portal Web Controls are stored in USR instead of BUS Layer
Query:
Dynamics AX 2009 Enterprise Portal Web Controls are stored in USR instead of BUS Layer. How to make it stored on any layer other than USR.
Answer:
As Web Controls are created in Visual Studio and stored in the AOT by using the .NET Business Connector, I’ve used the Dynamics AX 2009 Client Configuration Tool to update the Business Connector (non-interactive use only) configuration.
However even with this configuration change the newly created Web Controls were still added to the USR Layer instead of the specified BUS Layer.
The reason for this was that the .NET Business Connector in this scenario in not reading the configuration Business Connector (non-interactive use only) but the Local Client configuration.
By updating the Local Client configuration in Dynamics AX 2009 Client Configuration Tool my newly created objects were successfully stored in the BUS Layer.
Note: Make sure to apply the Development License and Licence codes as appropriate.
Dynamics AX 2009 Enterprise Portal Web Controls are stored in USR instead of BUS Layer. How to make it stored on any layer other than USR.
Answer:
As Web Controls are created in Visual Studio and stored in the AOT by using the .NET Business Connector, I’ve used the Dynamics AX 2009 Client Configuration Tool to update the Business Connector (non-interactive use only) configuration.
However even with this configuration change the newly created Web Controls were still added to the USR Layer instead of the specified BUS Layer.
The reason for this was that the .NET Business Connector in this scenario in not reading the configuration Business Connector (non-interactive use only) but the Local Client configuration.
By updating the Local Client configuration in Dynamics AX 2009 Client Configuration Tool my newly created objects were successfully stored in the BUS Layer.
Note: Make sure to apply the Development License and Licence codes as appropriate.
Sunday, March 20, 2011
Email Sending Issues, Dynamics AX
Query:
When trying to send the email using SMTP Client library I am receiving the following error "No connection could be made because the target machine actively refused it".
Answer:
This is because your request is being reject from the server you can do a simple test by using telnet. The details of the test can be found here : http://support.microsoft.com/kb/153119.
Make sure there is no firewall e.t.c which is rejecting the request.
When trying to send the email using SMTP Client library I am receiving the following error "No connection could be made because the target machine actively refused it".
Answer:
This is because your request is being reject from the server you can do a simple test by using telnet. The details of the test can be found here : http://support.microsoft.com/kb/153119.
Make sure there is no firewall e.t.c which is rejecting the request.
Tuesday, March 15, 2011
Thursday, March 10, 2011
Wednesday, March 9, 2011
Wednesday, March 2, 2011
Tuesday, March 1, 2011
'Print' field in dynamics ax tables
Query: I am getting a database error when I add a field named 'print' in ax tables.
Answer: This is because print is a Sql Server system field and it should not be used as a field in Dynamics AX.
Answer: This is because print is a Sql Server system field and it should not be used as a field in Dynamics AX.
Edit Method in AX
Query: How to write an edit method in AX?
Answer:
edit CustName editCustomerName(boolean _set,
CustName _name)
{
CustName name = _name;
CustTable custTable;
if (_set)
{
if (name)
{
ttsbegin;
custTable = CustTable::find(this.custAccount, true);
custTable.name = name;
custTable.update();
ttscommit;
}
}
else
{
name = CustTable::find(this.custAccount).name;
}
return
Subscribe to:
Posts (Atom)