Thursday, 29 October 2015
Thursday, 15 October 2015
query not updated.
Hi,
Have you ever work with query in the class? and after do some changes to the query in the class, when you run it, the query is not updated?
Well, its because of the sysLastValue. It keep your query saved. So whenever you change the query, it still be using the old one, unless you delete the saved query at the sysLastValue.
If you realized, after you changed the query, when you debugged it, it does not go into your initQuery() method, but once you deleted the saved query, it will go into the initQuery() again, to get the new query to run. now! you'll have your new, fresh updated query run.
To delete the sysLastValue is, go to the aot:
AOT > System Documentation > Tables > SysLastValue
right click at the SysLastValue, go to the table browser, find your element name, and delete everything that is listed there related to your element. make sure you deleted the right one.
wallah! now you good to go! :)
Have you ever work with query in the class? and after do some changes to the query in the class, when you run it, the query is not updated?
Well, its because of the sysLastValue. It keep your query saved. So whenever you change the query, it still be using the old one, unless you delete the saved query at the sysLastValue.
If you realized, after you changed the query, when you debugged it, it does not go into your initQuery() method, but once you deleted the saved query, it will go into the initQuery() again, to get the new query to run. now! you'll have your new, fresh updated query run.
To delete the sysLastValue is, go to the aot:
AOT > System Documentation > Tables > SysLastValue
right click at the SysLastValue, go to the table browser, find your element name, and delete everything that is listed there related to your element. make sure you deleted the right one.
wallah! now you good to go! :)
Monday, 29 December 2014
error: dynamic property of the field list of query data source 'MyTable' has not been set
if you ever encounter this kind of error:
"The dynamic property of the field list of query data source 'MyTable' has not been set"
try this:
open query>DataSource>Field
Check property of filed it will have a property called "DYNAMIC PROPERTY" which is set to unspecified by default. Make it yes
Tuesday, 7 October 2014
Unable to preview SSRS reports from Visual Studio 2010
i have encountered this error when I try to edit SSRS report from my local VM. It seems not possible to work with SSRS report on these machines.
they way i solve this is by installing the Business Intelligence Development Studio feature of Microsoft SQL Server.
by using the ISO file from > http://www.microsoft.com/en-us/download/details.aspx?id=36843
choose SQL Server Data Tools
Wednesday, 20 August 2014
Enable Debug
You must enable debugging for each component as follows:
1. In the Development Workspace, on the Tools menu, click Options > Development > Debug,
and then select When Breakpoint in the Debug mode list.
2. From the AOS, open the Microsoft Dynamics AX Server Configuration Utility under Start
> Administrative Tools > Microsoft Dynamics AX 2012 Server Configuration. Create a new
configuration, if necessary, and then select the check box Enable Breakpoints to debug X++
code running on this server.
3. For Enterprise Portal code that uses the BCPROXY context to run interpreted X++ code, in the
Microsoft Dynamics AX Server Configuration Utility, create a new configuration, if necessary, and select the check box Enable Global Breakpoints.
1. In the Development Workspace, on the Tools menu, click Options > Development > Debug,
and then select When Breakpoint in the Debug mode list.
2. From the AOS, open the Microsoft Dynamics AX Server Configuration Utility under Start
> Administrative Tools > Microsoft Dynamics AX 2012 Server Configuration. Create a new
configuration, if necessary, and then select the check box Enable Breakpoints to debug X++
code running on this server.
3. For Enterprise Portal code that uses the BCPROXY context to run interpreted X++ code, in the
Microsoft Dynamics AX Server Configuration Utility, create a new configuration, if necessary, and select the check box Enable Global Breakpoints.
Tuesday, 19 August 2014
Set your date to first day of month
Code below is used when you want to set your date by default to 1st day of month, & the records are then filtered to only show invoices posted
after this date.
public void run()
{
//to set the date to default
FromDate.dateValue(systemDateGet() -dayofmth(systemDateGet()) + 1);
super();
}
after this date.
public void run()
{
//to set the date to default
FromDate.dateValue(systemDateGet() -dayofmth(systemDateGet()) + 1);
super();
}
Monday, 18 August 2014
Sets
A Set is used for the storage and retrieval of data from a collection in which the
members are unique. The values of the members serve as the key according to
which the data is automatically ordered. Thus, it differs from a List collection
class where the members are placed into a specific position, and not ordered
automatically by their value.
Set members may be of any X++ type. All members in the set must have the
same type.
When a value that is already stored in the set is added again, it is ignored and
does not increase the number of members in the set.
static void Sets(Args _args)
{
Set setOne;
Set setTwo;
SetEnumerator enumerator;
Int value;
//insert data into sets
setOne = new Set(types::Integer);
setOne.add(1);
setOne.add(2);
setOne.add(3);
setTwo = new Set(Types::Integer);
setTwo.add(3);
setTwo.add(4);
setTwo.add(5);
enumerator = setOne.getEnumerator();
while (enumerator.moveNext())
{
value = enumerator.current();
//comparing setone & settwo
if (setTwo.in(value))
{
//deleting same value as setone in settwo
setTwo.remove(value);
}
}
//print no of elements in sets
info(strFmt('Set one element is : %1', setOne.elements()));
info(strFmt('Set two element is : %1', setTwo.elements()));
//print set one elements
enumerator = setOne.getEnumerator();
while (enumerator.moveNext())
{
setPrefix(strFmt('%1', 'Set one'));
info(strFmt('%1', enumerator.current()));
}
//print set two elements
enumerator = setTwo.getEnumerator();
while (enumerator.moveNext())
{
setPrefix(strFmt('%1', 'Set two'));
info(strFmt('%1', enumerator.current()));
}
}
members are unique. The values of the members serve as the key according to
which the data is automatically ordered. Thus, it differs from a List collection
class where the members are placed into a specific position, and not ordered
automatically by their value.
Set members may be of any X++ type. All members in the set must have the
same type.
When a value that is already stored in the set is added again, it is ignored and
does not increase the number of members in the set.
static void Sets(Args _args)
{
Set setOne;
Set setTwo;
SetEnumerator enumerator;
Int value;
//insert data into sets
setOne = new Set(types::Integer);
setOne.add(1);
setOne.add(2);
setOne.add(3);
setTwo = new Set(Types::Integer);
setTwo.add(3);
setTwo.add(4);
setTwo.add(5);
enumerator = setOne.getEnumerator();
while (enumerator.moveNext())
{
value = enumerator.current();
//comparing setone & settwo
if (setTwo.in(value))
{
//deleting same value as setone in settwo
setTwo.remove(value);
}
}
//print no of elements in sets
info(strFmt('Set one element is : %1', setOne.elements()));
info(strFmt('Set two element is : %1', setTwo.elements()));
//print set one elements
enumerator = setOne.getEnumerator();
while (enumerator.moveNext())
{
setPrefix(strFmt('%1', 'Set one'));
info(strFmt('%1', enumerator.current()));
}
//print set two elements
enumerator = setTwo.getEnumerator();
while (enumerator.moveNext())
{
setPrefix(strFmt('%1', 'Set two'));
info(strFmt('%1', enumerator.current()));
}
}
Subscribe to:
Posts (Atom)