The code following code fragment fails to compile with the error:
A reference to 'Dynamics.AX.FiscalBooks', Version=0.0.0.0, Culture-neutral, PublicKeyToken=null' is required to compile this module.
If I add a reference to J:\AosService\PackagesLocalDirectory\FiscalBooks\bin\Dynamics.AX.FiscalBooks.dll, it then fails with the 3 errors:
X++ compiler exited unexepectedly with failure code -1.
Compilation failed.
Abnormal termination with unhandled exception. Exception key: 765d805b-72e6-4d9f-adcd-c994d2f5cd7f. System.IO.FileNotFoundException: Could not find file 'J:\AosService\PackagesLocalDirectory\dwd_RC2\bin\Dynamics.AX.FiscalBooks.Queries.0.netmodule'. ...
Removing the reference does not return to the original state, but continues to produce the same 3 errors.
What I am trying to do (ultimately) is test the existence of an InventSite record corresponding to the operating unit number of an OMOperatingUnit record. Why can I not do the selection?
class RC2
{
public static void main(Args _args)
{
OMOperatingUnit ou;
InventSite site;
while select ou
{
var depot = ou.OMOperatingUnitNumber;
select site where site.SiteId == depot;
}
}
}