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
0
votes
1 answer

Mapping Vendor Item Number to Sales Lines, or clone existing field to a created one

I'm trying to customise a report with a value from an unrelated table. I can't figure out how to get an existing field to populate my custom field. Specifically, I need the Vendor Item No. from Items (or Item Card) to be available on the Sales Lines…
0
votes
2 answers

cant figure out how to delete an already existing time sheet using AL language

i have been trying the code down below in the picture but it didnt work i am new at al coding and i cant seem to find good videos or site on the net (if u have good sites or youtube channels they might help too). this is my try this is my page
iheb
  • 1
  • 2
0
votes
1 answer

BC: How to add a dataset and modify a report from 'base microsoft' with a 100xx ID?

I am trying to modify a report that is given by base microsoft and I can't figure out how to 'replace' and add a dataset the 10081 report. I have tried copying the report and modifying it, but I need to add a dataset and don't have access to the al…
ateanight
  • 1
  • 1
0
votes
0 answers

How to detect when ctrl+s is triggered in a visual studio code file in typescript

Im building an extension for VS Code in Typescript. I want to upload a Excel file everytime that the user saves a document. How can i detect the ctrl+s action so i can use the code to update the excel file? I tried to declare a event but it doesnt…
0
votes
1 answer

Business Central - 'OnCustomDocumentMergerEx' even does not trigger

I Recently tried to refactor a deprecated part of our code, which is an event subscription to 'OnBeforeMergeDocument', Because i had some problems regarding the printer name which I posted about in this Stack Overflow post. I then tried to bind to…
Luke_
  • 745
  • 10
  • 23
0
votes
1 answer

You do not have the following permissions on CodeUnit ... Execute

I have an AL extension deployed on a BC V20 On-Prem system (Version: GB Business Central 20.0 (Platform 20.0.37114.38150 + Application 20.0.37253.38230)). It was working fine until a new licence was installed. It also works on a Cloud Sandbox. A…
0
votes
1 answer

How to escape a character in a string in business central AL

I keep coming across situations where i need to escape a character such as a quote. I never been able to figure out how to do this since a simple Message('test \' test'); doesn't work. Every time i need to figure out a workaround, and its starting…
0
votes
0 answers

How to consume Business Central SOAP Web Service with OAuth2 in ASP.NET CORE

I have implemented a codeunit in Business Central AL and published it as a SOAP Web Service with OAuth 2.0 authentication protocol. Now the challange comes when I try to consume this service in ASP.NET CORE. Please help. Greetings Team, I have…
0
votes
1 answer

Make column section width relative in D365 Business Central cloud

I am a seasoned MS CRM developer with very little experience in BC/AL development. I have a current CRM client that also uses BC and has I small request I am trying to assist with. When adding new column sections in a record, the client wants the…
0
votes
1 answer

correct way to encode the (forward slash /) in Dynamics BC AL

I am calling external API from HTTP client Source Code: usercontrol(html; HTML) { ApplicationArea = all; trigger ControlReady() Var JSONManagement: Codeunit "JSON…
0
votes
1 answer

Business Central TempBlob and File Hash

I'm trying to do something that is harder than expected. I have to send a file (a pdf report, for example), via httprequest with multipart form-data. I managed to do that, only working with the tempblob codeunit (it has to be compatible with cloud…
0
votes
1 answer

How to declare a blob data type param on a function in business central

I'm new to business central, I want to remove an attached image file because my client requested that functionality. I created a function that will check that, and it is all working fine. I noticed that I'm doing a repetition for all the image…
AbdulAzeez Olanrewaju
  • 976
  • 1
  • 13
  • 32
0
votes
1 answer

How to get OAuth token in Business Central Codeunit (al code)

We have been searching and searching to find examples of how to get an OAuth token in al code in our codeunit. We can successfully get the token in Postman, so I know all the credentials are correct. But finding examples on the web of how to do…
dmikester1
  • 1,374
  • 11
  • 55
  • 113
0
votes
1 answer

Business Central Get Token SharePoint

I'm trying to connect the business central with the sharepoint, I already did it in the postman, it worked fine, the GET and POST. But now Im trying to do it on BC, the token is created but not working, I think it has some problem with the…
0
votes
2 answers

If then statement inside a page field? Business central AL

Im trying to create page for giving my to customers discounts on my products, but for a short period of time. I have created a field "start date" and "end date" of this promotion. Next thing i want to do, is to validate the input of the date. By…