How to Use Standard Test Libraries

markclemarkcle Member Posts: 65
Hi All

Developing AL Extension in BC130 on-prem

I've imported the following from Dynamics.365.BC.33838.NA.DVD\TestToolKit and downloaded symbols
  • CALTestRunner
  • CALTestCodeunits.US
  • CALTestLibraries.US

I'm trying to create a customer in one of my test codeunits:
local procedure CreateCustomer(var Customer: record Customer)
begin
    LibrarySales.CreateCustomer(Customer);
end;

I get this error:
The name 'LibrarySales' does not exist in the current contextAL(AL0118)

If i use object explorer, I can see codeunit 130509

I guess I'm missing a step. Any ideas?

Thanks

Mark

Best Answer

  • markclemarkcle Member Posts: 65
    Answer ✓
    Fixed it. needed to decl;are the var:
    LibrarySales: Codeunit "Library - Sales";
    

Answers

  • markclemarkcle Member Posts: 65
    Answer ✓
    Fixed it. needed to decl;are the var:
    LibrarySales: Codeunit "Library - Sales";
    
Sign In or Register to comment.