Skip to main content

Posts

Showing posts from 2020

Print Blank when the value is Zero in Navision (RDLC) Reports

 Hi Everyone, First of all, Wish You all Happy New Year in Advance. May God bless you all with wonderful life ahead😊😊😊.. Print Blank when the value is Zero in Navision (RDLC) Reports Sometimes when we are printing Integer or Decimal type field in RDLC Report we didn't want to display 0 if the value of that field or expression is Zero, but rather display it as blank. Example:-  Here we have created one Report, and you can see that in Debit(LCY) and Debit (ACY) column fields value is zero and it did not print zero i.e, its printed as blank. This is only done because in RDLC Report Properties there is a pre-defined function called BlankZero which looks like :   This function consider numeric value and if the value is zero it returns blank text string. So if you need to display blank you can use the below mention expression with the required field value. =Code.BlankZero(Fields!Debit_Amount.Value) Syntax denoted as : =Code.BlankZero(YourFieldHere) I hope this blog helps ...

Amount In Words in Navision / Business Central

Hi Guys, In this article, we will see how to display amount in words in Microsoft Dynamics Business Central. Here, I am taking an example of Report object  which is widely used in Navision for converting decimal amount field into words. Procedure :-  Step-1 Declare the following Global Variables :         RepCheck:  Report  "Check";         NoText:  array [ 2 ]  of   Text ;         AmountInWords:  Text ; where, (1) RepCheck is a variable of  Report DataType Named as " Check " which is 1401. (2) NoText is a variable of DataType " Text " with array Dimension value as 2 which is defined as shown above. (3) AmountInWords is a variable of DataType " Text " which will store final result of amount in words. Step-2 Now, add the following code in OnAfterGetRecord() trigger of DataItem containing that decimal field value. So in my cu...

Calculate Date : Using Date Formula and CalcDate Function in Navision/BC

 Hi Everyone, In this article we will see how we can Calculate Date by adding and subtracting No. of Days / Months based on CalcDate and DateFormula datatype. Here, I define three variables required for: (1) " No of Days " -  To define No. of Days / Months as required. You can also use these units denoted as: <Unit> = D | WD | W | M | Q | Y (D=day, WD=weekday, W=week, M=month, Q=quarter, Y=year). (2) " From Date " and " To Date "  Date type Variables to store calculated date in it. page   50103  "Date from Date Formula" {     PageType = Card;     ApplicationArea = All;     UsageCategory = Administration;     SourceTable =  Integer ;      layout     {          area( Content )         {    ...

How to set PublicWebBaseUrl in configuration key while Publish Extension in MS Dynamics 365 Business Central

Hi Guys, In this blog we will see how we can fix the below mentioned error: Error: Could not open the specified startup page. Please check that the server configuration key PublicWebBaseUrl has been properly set. While Publishing the extension via VS Code after installation of MS Dynamics 365 Business Central, I got error to set PublicWebBaseUrl as shown below. You can solve this as follows: Open Microsoft Dynamics 365 Business Central Administration Panel and Go to service configured which is BC140. Then in Client Services Fast tab - Set the below mentioned property as : Syntax -  http[s]://[hostname]:[port]/[webserverinstance] Web Client Base Url -  http://localhost:8080/BC140/ After setting this property save and Restart the service. Then Restart Visual Studio Code and Publish the app again. This will resolve your error. Stay tuned for next blog😉

Lock/Block Page Filters in Dynamics Navision : By using FilterGroup()

 Hi Folks, In this blog we will see how we can set the filters on Page Programmatically i.e,  users cannot remove the filter by clicking the “ Clear Filter ” button. But if we will not use filtergroup here, only use SetRange then user will clear these filters using "Clear Filters" from Filters Pane. Sometimes we have to use this feature for security purpose also (Like Users can see the contacts only created by user itself) . Here i am taking example of Contacts. Currently if you open Contacts in Navision it will show you all contacts. Now add Filter of "SalesPerson Code" is equal to AH along with FilterGroup or any other filter you want, Also, i am adding Action button named "Contacts (with Filters)" on company Information page to Run Contact List Page based on our filters. pageextension   50100  "Company Information Extension"  extends  "Company Information" {      actions     {   ...

OTP SMS Authentication in AL (Business Central) without using .Net Variables

    OTP  is a "One-Time Password" which is randomly generated and sent to your registered mobile  number  or email address for validation of your transaction. In MS Dynamics NAV, OTP authentication can add an extra layer of security to our Environments. This is basically also known as two-factor authentications. In this scenerio, we will see how we can use OTP functionality in NAV and i am using  Nexmo  here to implement it.   Step-1  Firstly, Create a new account on Nexmo or you may use any other SMS service provider to get the API and their Secret Key.Here i have created a  free account for Testing Purpose using this Url - https://nexmo.com/   Once you have created an account, you will get your API credentials in the dashboard. Use the "API Settings" link to the right near the top of the screen to reveal the API key & its secret. Step-2  Now, we need to create a new page and declare a global variable n...

The Txt2Al Conversion Tool: How to Export Dynamics NAV objects (.txt) and converting to AL

Hi folks, In this article, I will show you how you can use Txt2Al conversion tool that is the part of NAV 2018 and Dynamics 365 Business Central On-Premise. Using this Txt2Al conversion tool you can take existing Dynamics NAV objects that have been exported in .txt format and convert them into the new .al format and use these .al format file directly using Visual Studio Code to develop/build extensions for Dynamics 365 Business Central. Converting the NAV objects consists of following 2 steps: 1. Exporting the objects from C/SIDE [Either from Development Environment or using PowerShell Command] 2. Converting the objects to the new syntax. You can find Txt2Al tool in following location if you installed Dynamics 365 Business Central On-Premise on your machine: C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\140\RoleTailored Client \Txt2Al.exe Steps to use the Txt2Al conversion tool:  Reference Step 1:  Compile your Dynamics NAV DB Step 2: ...

OTP Authentication in Microsoft Dynamics NAV using C/AL

  OTP  is a "One-Time Password" which is randomly generated and sent to your registered mobile  number  or email address for validation of your transaction.  In MS Dynamics NAV, OTP  authentication can add an extra layer of security to our Environments. This is basically also known as two-factor authentications. In this scenerio, we will see how we can use OTP functionality in NAV and i am using Nexmo here to implement it. Step-1 Firstly, Create a new account on Nexmo or you may use any other SMS service provider to get the API and their Secret Key.Here i have created a  free account for Testing Purpose using this Url - https://nexmo.com/   Once you have created an account, you will get your API credentials in the dashboard. Use the "API Settings" link to the right near the top of the screen to reveal the API key & its secret. Step-2 Now, we need to create a new page and declare a global variable named " InputOTP " then set that variable as a...