Questions tagged [dynamics-al]

Application language (AL) is the language used to create objects in Microsoft Dynamics 365 Business Central. With AL, you can manipulate data, and the statements and functions are able to read, write, and change data in the Business Central database. Use with the [dynamics-business-central] tag

AL is a programming language to create objects in Microsoft Dynamics 365 Business Central. From the Microsoft site

All functionality in Business Central is coded in objects. The extension model is object-based; you create new objects, and extend existing objects depending on what you want your extension to do. Table objects define the table schema that holds data, page objects represent the pages seen in the user interface and codeunits contain code for logical calculations and for the application behavior. These objects are stored as code, known as AL code, and are saved in files with the .al file extension. The AL Language extension also supports the multi-root functionality which allows you to work with multiple AL folders within one workspace.

85 questions
1
vote
1 answer

Delete multiple special characters in string

I'm new in Dynamics 365 Business Central and AL. I need to delete special characters from a string (email address, phone numbers). I tried DELCHR(String,'=','['), but there are more chars forbidden. I know I can add more than one, but I don't know…
HanBen87
  • 13
  • 3
1
vote
2 answers

How to send a get Request in AL

I currently have 2 problems. I am trying to send a GetRequest to my web service. This is done with the SendNotify (phonenumber: text; template: text) method. When I call the method via an action, I get the following error message: Misused header…
Doncarlito87
  • 359
  • 1
  • 8
  • 25
0
votes
0 answers

Business Central AL Event : Create a "warehouse shipping" on "Sale order"

I need to modify a "Warehouse Shipping Order" after is created from a "Sale Order". I expected to find the "OnAfterShippingOrderCreate" event with a "Sale Order Header" as input but I don't find that. There is a event to intercept after the…
0
votes
0 answers

Transaction error on running report in test codeunit

When i run any report in the test codeunits via the al test tool i get a transction error: Error the error happens when in anyway when a report is run. in the current version of the code it is trigger by Report.RunRequestPage Subtype =…
0
votes
0 answers

Looping over records of table "Page Action" crash the application?

I'm writing a code in AL to insert all actions of all pages in the system in a table, BUT somehow looping over Record "Page Action", In this code snippet I've just shown the name of the action but still running this procedure didn't show any…
0
votes
0 answers

how to debug RDLC when data shows in code but does not show up in RDLC in preview mode

Hello Stack Overflow community, I am encountering an issue with an RDLC report I'm working on. The data for the report shows up perfectly fine in Visual Studio Code during design time, but when I run the report and view it in RDLC's preview mode,…
0
votes
1 answer

How Do I Get a Customer's Custom Report Layout ID from their Document Layouts in Business Central?

I am writing a Business Central extension that adds a button to the Sales Order List page, which saves a PDF copy of a sales order confirmation with the file name format "Sales Order [Order No.].pdf". Some customers may have custom report layouts…
0
votes
0 answers

Dynamics 365 (Business Central Cloud) Xmlport returns a different result depending on whether I retrieve it or not

I have a Schrodinger code . I have this Xmlport to import data. If I catch the result, it's always False and the data obviously is not committed. If I don't catch it, it works fine, there is no error raised and the data is correctly…
0
votes
0 answers

How to customise the textMateRules in order to colour the code inside a #pragma warning disable and a #pragma warning restore statement in VS Code?

I find hard to tell what code will be run by just reading the code because the lines between a #pragma warning disable and #pragma warning restore statements don't change colours So i'd like to know if it's possible to do that with the…
0
votes
1 answer

Can you pass a parameter to a Page using RunObject?

I have a role center page which I've set up with a few actions. Clicking the action will open a list page which is pre filtered (using RunPageView). I would like to pass the filter to the list page somehow but cant seem to find the answer out…
0
votes
2 answers

MinValue/MaxValue based on a Global Variable

In Business Central it's possible to make something like that: } field(5; "From"; Integer) { Caption = 'From'; DataClassification = SystemMetadata; Editable = FromEditbale } } var FromEditable: Boolean So…
0
votes
0 answers

NAV 2013 Automation Object not initialized?

so i have following problem and really dont know why it’s not working: I create an automation in NAV 2013. For that, i use following code: CREATE(HTTPRequest,FALSE,TRUE); The HTTPRequest is a variable of DataType Automation and SubType 'Microsoft…
FenCy
  • 1
0
votes
1 answer

Can you dynamically create a list page in Business Central using AL?

Is it possible to dynamically create a list page in Business Central using AL where you define the columns on page load? Example is I have a data table defined where there are Fields 1 - 5: table 50102 MyDataTable { DataClassification =…
Dermo909
  • 128
  • 7
0
votes
0 answers

OData V4 Web Service Expanded Property cannot be found

`Hello, I have Developed multiple Custom APIs to receive Documents and respective Lines. Orders/Shipments/Credits. The data is inserted into one single table if that information is of any help. However, At times, without any changes to the code (API…
0
votes
1 answer

Access ControlAddin when extension Event is triggerred

I set up a controlAddin and am able to interact with it using by adding an action that I added to the pageextension. Basically, the controlAddin is a simple javascript code that plays a sound depending on the result of the action. I would like to…
VVV
  • 7,563
  • 3
  • 34
  • 55