Hi experts,
I'm trying to do a simple implementation of a old simple script that select data from a Table present in Dynamics AX 7. My target is to create a Runnable Class (Job) similar as I've done with the Development Workspace in AX 2012 R2. The script that works in AX 2012 is the following:
static void Intro_Select(Args _args)
{
SalesLine salesLine;
select count(RecId),sum(SalesQty) from salesLine;
info(strFmt("Number of Records : %1 Total Quantity : %2",SalesLine.RecId,SalesLine.SalesQty));
}
Then, I've created a script equivalent in my Runnable Class (Job) in my Visual Studio 2015 Professional Solution is the following:
class Intro_Select
{
/// <summary>
/// Runs the class with the specified arguments.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
SalesLine salesLine;
select count(RecId),sum(SalesQty) from salesLine;
info(strFmt("Number of Records : %1 Total Quantity : %2",SalesLine.RecId,SalesLine.SalesQty));
}
}
The problem is when I build it and then run. It appears the following error message:
Severity Code Description Project Project Rank File Line Column Suppression State
Error A reference to 'Dynamics.AX.Directory, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is required to compile this module. DevelopmentBasicsFMSProject (USR) [DevelopmentBasicsFMS] 1 C:\AOSService\PackagesLocalDirectory\bin\XppSource\DevelopmentBasicsFMS\AxClass_Intro_Select.xpp 7 5
I've tried to search many search results from Google and none gives me an answer to where I could find the missing dll or where I could download the missing dll or even how to solve my issue. I didn't think that it was this difficult to make a simple select statement in Dynamics AX 7.
Can you guys help me out? What I should download or make sure I have in my VM? Can you provide me a path or relative path that I can find the reference to add to my project? Can you guys please address me where or what I must import from "Tools>Extensions and Updates"?
Best regards and good luck for all in your individual businesses,
Miguel Braga
*This post is locked for comments