How to create a Card Type Page in Business Central
Overview
The main purpose of the card type page is to display the records from a table and we can choose the fields which we want to show on the card page. We design the card pages when we want to give user the freedom to view, create and modify the records of a table.
The card type of page is typically associated with List the of page which uses the same table as card page. Difference is that list pages provide an overview of all records in a table while card page gives us information about a single record in that table.
When a user selects a record from List page then it usually opens the card page for that record, allowing the user to view and modify the fields of that record. In most cases we use the card page for the master data.
Let’s Design our First Card Page using VS Code!
- The very first step for designing a card type page is defining “PageType” property as Card and giving the source table for card page.
2.After that, in layout section and inside area (Content), we can choose the fields which we want to show on the page. We can divide the fields in groups/FastTabs in an optimized way, such that the user can browse through field in effective manner.
3.We can also add “FactBox” on a card type page. Like here, we have added a part in “FactBox” showing customer ledger entry details.
- Now Let’s add an action on our card type page. Like here we have provided an action on card type page of a customer which will directly open a sales order page for creating a sales order.
5.Now that we have designed our First Card Page, to see how it looks, we have to publish it.
- As we added our action in New (PromotedCategory), we will now click on new to find our action which we created.
For more details kindly visit our linkedin page:
https://www.linkedin.com/company/allgrow-technologies-pvt-ltd/mycompany/
By Harshit. T.
How to create a Process Only Report in Business Central
- Sometimes when you have to write a lengthy code just to open some specific table and retrieve the data from that table, that is when Process Only report comes into picture.
- With report data modeling structure, we can do that task in a simple way.
- We can create some functionality may be by using code unit objects and also by programming with the help of filters, loops, request pages…etc.
- By using ‘Process Only report’ available in Business Central we can avoid writing complex or lengthy codes in visual studio code.
Let’ see how to create simple process only report with one example.
- We can create process only report with or without using ‘Request Page’.
- But it doesn’t need any layout design.
- So, to create ‘Process only Report’, open visual studio code type ‘treport’ and select report snippet.
- Give the proper ID and name.
- In the next step, give the proper caption for the report, set ‘ProcessingOnly propert’ to ‘true’ and set ‘UseRequestPage’ property to false or true according to your need.
Caption = ‘Report Caption’;
ProcessingOnly = true;
UseRequestPage = false;
- Here I’m creating a ‘Process Only Report’ for increasing the ‘Allowing Posting From’ and ‘Allowing Posting To’ date fields in ‘User Setup’ page.
- So that whenever the report is run, the dates present in those fields should be increased by day.
- As shown below, I’ve given proper Id and name with the required properties.
- Inside the dataset, I’ve used “User Setup” table.
- I’ve written my code inside the trigger OnAfterGetRecord( ).
- By using CalcDate function I’ve written the code for increasing the dates of “Allow Posting From” and “Allow Posting To” fields.
- And I’ve set modify trigger for ‘User Setup’
- And now the report is published!
report 50850 “Auto Date Update ReportV”
{
Caption = ‘Auto Date Update ReportV’;
ProcessingOnly = true;
UseRequestPage = false;
dataset
{
dataitem(“User Setup”; “User Setup”)
{
trigger OnAfterGetRecord()
begin
“User Setup”.”Allow Posting From” := CalcDate(‘<+1D’, “User Setup”.”Allow Posting From”);
“User Setup”.”Allow Posting To” := CalcDate(‘<+1D’, “User Setup”.”Allow Posting To”);
“User Setup”.Modify()
end;
}
}
}
- After running the report, in the Business central open the ‘Job Queue Entries’ page, click on new, give your report ID, automatically the name of my report will come.
- In the Recurrence section, select the days on which the report should run.
- Go to the Process section in the top and click on ‘Run Once’.
- Open User Setup page and check the dates, the dates will be increased by 1Day.
- The below image shows the previous date.
- After running the report, the below image shows the updated dates.
For more details kindly visit our linkedin page:
https://www.linkedin.com/company/allgrow-technologies-pvt-ltd/mycompany/
By Vinyas. S.
How to create a List report in Business central
So far in the Report series blog, we have discussed about what is a report and the types of report. In this blog, let’s discuss about how to create a list report.
So, what is a List Report?
A list report displays the data in rows and columns from database.
Let’s now learn how to create a list report in VS code!
- Create a new file in VS code, once the file is created type “treport”, it’s a snippet to create a report.
- Specify the default layout as RDLC and specify the RDL layout in the report.
- Specify the data item and add columns, like mentioned in the below screenshot.
- Save the code, to create package go to “View” action click on “Command Palette” search for “AL:Package” and click on it, package will be created.
- Once the package is created, right click on the package click on “Open Externally”.
When you click on “Open Externally” RDLC layout will open in the report builder.
- When the layout opens, it will be blank. You have to design the layout.
- Go to Insert and select insert table to add fields to the table, expand the datasets in the left-hand side, drag and drop the field into the table.
8.Save the layout and close the report builder (or minimize).
9.Now need to run the report, go to VS code click on Run action click on Run without debugging.
10.Business Central page will open, search for your report, then click on Preview to view the result.
Result for above report will be like this.
For more details kindly visit our linkedin page:
https://www.linkedin.com/company/allgrow-technologies-pvt-ltd/mycompany/
By Manasa. D.