How to build Multiline Instruction in Business Central

Few days back one of my customer ask me can you display text in bulleted format on page.

Today I will show how I achieved this with very simple way.

Created one page as follows with one field to display instruction in multiline format

On the field set the multiline property to true.

To display to instruction on bullet format created instruction variable as follows

If we concatenate the instruction then it will display in single line so we need to break the line .To break the line used following code unit Type helper.

Lets see the result after publishing

Hope this will help you.

Stay tuned for more.

How to Create Custom Event in Business Central

Looking at the subject there are lot of blogs available but I am writing this based on one of the request from my colleague.

Everybody aware of that whenever you developed an app it need to be extensible and if anybody would like to add or modify any field or additional routing we need to have events which can extend the base functionality.

Step 1 :- Simple Quick action to add event in Business Central

Next step will be we can subscribe the event and add you own code.

It is so simple to add custom event in AL and allow other to extend your functionality.

Hope this will help you.

Stay tuned for more updates.

How to create Custom Notification in Business Central

This blog post I am writing based on request of one of the follower.

Even though notification is not new business central world but today we will see how we will write custom notification and get notified for certain validations.

To create notifications I added following simple scenario that when my page get opened it should show some notification.

Lets see how we can do this.

To generate this notification I have used customer list page and subscribe on OnOpenPageEvent to execute my notification.

In this notification whenever page will get open it will show notification and whenever user click on Contact Us it will redirect to my blog.

Once this piece of code is published and as soon as customer list page opens you will see the result of notification as below

Hope this will help you.

Stay tuned for more..

How to convert long code into Procedure in AL/Business Central.

With the different code actions it is very easy to convert your long code into procedures. Just a small tip to convert to your long code into smaller procedures.

To enable to code actions

Hope this will help you.

Stay tuned for more.

How to Implement Interface in Business Central

With the release of Business Central Wave 1 2020 new feature was introduced called ‘Interface’. It is basically syntactical contract that can be implemented by a non-abstract method. This allows for writing code that reduces the dependency on implementation details, makes it easier to reuse code.

Today we will see how to write an interface and implement in Business central.

For defining interface we no need to have object id.

If you can see in above interface we just define method but not programmed any business logic.

Now Lets see how to implement interface.

Added new code unit which implements the defined interface.

For checking the result of interface created following page with one function.

Above function to initialize the interface.

Lets check the result of interface.

Hope this will help you to understand interface and implementation.

To understand more on differentiate between events and interface read Interface Vs Events..

Stay tuned for more…

Business Central 2020 Wave 1

Microsoft reveals plan for business central with upcoming release 2020 Wave 1

This release comes with lot of new enhancement and features which will make business central more fun to work with.Listing few of them features.


AL interfaces
https://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/al-interfaces
Look up events and insert event subscriber in codehttps://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/lookup-events-insert-event-subscriber-code
Ability to refactor a field from a table to a table extensionhttps://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/ability-refactor-field-table-table-extension
Application version for aliasing base applicationhttps://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/application-version-aliasing-base-application
Enhanced customer and vendor document layouthttps://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/enhanced-customer-vendor-document-layout
Multiple languageshttps://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/multiple-languages
Expanded country and regional availabilityhttps://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/expanded-country-regional-availability
Migrate data from Business Central 14.x on-premises to Business Central 15.x onlinehttps://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/migrate-data-business-central-14.x-on-premises-business-central-15.x-online
Disable export of data to Excelhttps://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/disable-export-data-excel
Improved load time for pageshttps://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/improved-load-time-pages
Improvements to data entryhttps://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/improvements-data-entry

Unhide parts on a page
https://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/unhide-parts-page

Import profiles and UI customizations
https://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/import-profiles-ui-customizations
Business Central integration with Common Data Servicehttps://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/business-central-integration-common-data-service

Collapse and expand document lines
https://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/collapse-expand-document-lines

Looking forward for this change.

For more details visit

https://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/planned-features

How to Create Unique Keys in AL Development/Business Central

Spring Release 2019 of business central comes up with new features for creating unique keys

Today we will see how to create unique keys in table

While creating second keys you can add an additional parameters said ‘Unique’. This will not allow duplicate values in the field where unique parameter is mentioned.

Now we will see this validation works on business central. Here we are trying put same description which is throwing error because of unique key.

You can define multiple unique keys in one table.

Points to Remember

  • Field can have empty value that means empty value is also value.
  • Not supported in table extensions.

Hope this will help you ..

What’s new in the Spring 2019 release of Dynamics 365 Business Central?

With the release of spring version new features added/updated in Dynamics Business Central.

  • Application Enhancements
    • Longer name and descriptions across business central . It is increased from 50 characters to 100 characters.
    • Multiple Item selections for Sales & Purchase documents.
    • Merge Duplicate customers, Vendors and contacts.
    • Bulk Import of Item Pictures.
    • View Item ,customer and vendor descriptions in Ledger entries.
  • Save and Personalized List views
  • Focus mode on document pages.
  • AutoSave Indicator
  • Page Inspector.
  • Improvements in Scrolling lists.
  • Customize the theme
  • Application as an App
  • Force Sync when deploying applications
  • Multiple objects ID Ranges in app.json
  • Multiple unique keys
  • Increased Maximum length of texts and code fields, variables and text constants.
  • Event Runtime optimization :- It is now 1.5. to 2.5 times faster

Many more features are there in this new version.

Stay tuned for more.