Quantcast
Channel: ArcherPoint, Inc. - How To
Viewing all 279 articles
Browse latest View live

Microsoft Dynamics NAV Cost Roll Procedure

$
0
0

Cost Roll Procedure in Microsoft Dynamics NAV 

Steps to Perform the Cost Roll Procedure in Microsoft Dynamics NAV

The information below explains the steps to follow while rolling standard costs in Dynamics NAV. The process is relatively simple, but the goal of this document is to explain the importance of each step: and what is accomplished in those steps. So while this may appear to be a long blog, stick with is as it provides a thorough explanation and rationale of each step.

Basics of the Standard Cost Worksheet

  • The worksheet is designed to be a “what if” tool when setting standard costs. The standard cost worksheet “Batch Name” allows the user to create multiple instances of cost rolls and load data with differing assumptions to see the impact of those assumptions on item costs.
  • The worksheet is designed so that the costs can be rolled and understood long before they need to be implemented. This is done in three ways:
    • The system allows you to set effectivity dates on the BOMs and Routings. When you roll the costs, the system asks you what date should be used when calculating the new standard costs. This lets you set the BOM and Routing effectivity dates in the future and not have an immediate impact on how production orders are processed.
    • The worksheet allows you to assume new Work Center costs in the worksheet without changing the Work Center cost information until the new costs are implemented.
    • The worksheet will use the information in the worksheet to calculate the new costs. If the item/work center does not exist in the worksheet then the Item/Work Center card information is used.
  • The worksheet holds all the cost element fields that make up the standard cost. These fields are identified with “New Single Level” as a prefix. Display these fields so that the cost elements can be reviewed to assure that all “New Single Level” costs are correct.
  • The standard cost of an item is the sum of Single Level Cost elements. It is critical that the cost roll accurately calculates the “New Single Level” cost elements. Changing the New Standard Cost field manually just populates the Single Level Material Cost field. A produced item must have all cost elements populated or the variance postings will not be correct.

Four Steps of Rolling Standard Costs

It is not necessary to execute all four steps every time. For example, if you are not changing the labor or overhead costs, then you do not need to run the second step. Or, if you are adding a new item, you only need to execute steps 3 and 4. Understand what each step does, and then run only the steps required to accomplish your cost roll objectives.

Step 1: Suggest Item Standard Cost

Dynamics NAV Cost Rolls - Suggest Item Standard Cost Button
Figure 1 - Suggest Item Standard Cost Button

The purpose of this step is to pull the purchased items into the Standard Cost Worksheet. During the cost roll process, the first step is to establish the new standard cost of the purchased items. A screenshot of the Suggest Item Standard Cost option page is shown below.

Dynamics NAV Suggest Item Standard Cost Option Page
Figure 2 - Suggest Item Standard Cost Option Page

The options page provides filters to select the items that should be pulled into the worksheet. Some filters to consider applying are:

  • Costing Method = Standard Cost. This makes sure that only standard cost items are pulled into the spreadsheet.
  • Replenishment System = Purchased. This makes sure that only purchased items are pulled into the spreadsheet.
  • Blocked = No. This makes sure that blocked items are not pulled into the spreadsheet.

Other fields that might be beneficial are: Vendor, Item Category, Product Type, Inventory Posting Group, or General Product Posting Group. Filtering by vendor allows you to use the Multiplier and increase the current standard cost by the defined amount for just that vendor. The point is that the filtering options allow you to bring the items in by the group and treat them the same if you want to use the “Adjust Factor” option to mark up the current standard cost.

The report also provides the ability to markup the current standard cost by a factor. For example, assume that you have a vendor that tells you they will be increasing prices by 5% next year. You could filter on items sourced from this vendor (Vendor = XXXXX) and set the Adjustment Factor = 1.05. While this is a powerful tool, it is also true that costs rarely behave in such a structured manner. The reality is that many parts change at their own rate and must be manually changed. The point is that the tool exists and may be able to be used to reduce the manual effort required to enter the new standard cost information.

The report also provides the ability to mark up the “Manufacturing Overhead” costs associated with the item. Note: these are the overhead costs associated with the Item Card. There is an Adjustment Factor for both the “Indirect Cost %” and “Overhead Rate” fields. It is more likely that using the filtering and adjustment factor together to control the markup of these overhead rates.

When the report runs it:

  • Finds the records that meet the filter requirements.
  • Multiplies the Adjustment Factor times the current standard cost to calculate the “new standard cost.” 
  • Populates the “Single Level Material Cost” field to match.
  • Multiplies the “Indirect Cost %” adjustment factor times the current “Indirect Cost %.”
  • Multiplies the “Overhead Rate” adjustment factor times the current “Overhead Rate.”
  • Calculates and populates the “Manufacturing Overhead” by totaling the overhead rates associated with the item card.

In the example below, you can see the factor was used to calculate the new cost for several items. Notice also that the “New Single Level Material Cost” field has been populated.

Dynamics NAV - New Single Level Material Cost Field Created
Figure 3 - New Single Level Material Cost Field Created

Once the purchased items have been pulled into the worksheet, the costs can be maintained manually by changing the value in the “New Standard Cost” field. This will also change the “New Single Level Material Cost” field.

You can move on to the second step in the process once the New Standard Cost for Purchased items has been set.

Step 2: Suggest Capacity Standard Cost

This step is to set the new labor and overhead costs assumptions for this cost roll. This report will pull the Work Center, Machine Center, and Resources into the standard cost worksheet. Note: Resources are used with Assembly BOMs.

Similar to the purchased items, the standard cost worksheet lets you change the labor and overhead assumptions in the spreadsheet without changing the work center until the costs are implemented. The report also lets you use an adjustment factor to set the new standard. The combination of filters and the Adjustment Factor allows the user to use the report to calculate the new standard rather than manually setting the new labor and overhead cost factors on the work centers and machine centers.

Dynamics NAV - Standard Cost Worksheet Work Center
Figure 4 - Standard Cost Worksheet Work Center

When the report runs it:

  • Finds the records that meet the filter requirements.
  • Multiplies the Adjustment Factor times the current Direct Cost to calculate the “new standard cost” field in the standard cost worksheet. 
  • Multiplies the “Indirect Cost %” adjustment factor times the current “Indirect Cost %” and populates the New Indirect Cost % field in the spreadsheet.
  • Multiplies the “Overhead Rate” adjustment factor times the current “Overhead Rate” and populates the “New Overhead Rate” field in the spreadsheet.

In the example below, you can see the factors that were used to calculate the new cost elements for the Work and Machine Center.

Dynamics NAV - Work and Machine Center Costs
Figure 5 - Work and Machine Center Costs

The user can manually change the “New Standard Cost” field once the report has pulled the Work Centers, Machine Centers, and Resources into the worksheet. These numbers will be used when the cost roll calculation is run.

Once the Labor and Overhead costs are finalized the user can move on to step three.

Step 3: Roll Up Standard Cost

The third step in the Cost Roll process is to run the report that will use the new Purchase Price, Labor, and Overhead costs to determine the “New Standard Cost” for produced items.

This report also provides the ability to select the items to roll the costs by using the filters in the option box. The option box prompts the user for a “Calculation Date.” The “Calculation Date” is used to select the BOM and Routing Versions, and the BOM Effectivity Date when calculating the new Standard Cost. Only components with “Start Date” less than the “Calculation Date,” and “End Date” greater than the “Calculation Date” will be included in the cost roll.

Dynamics NAV - Cost Roll Option Box
Figure 6 - Cost Roll Option Box

The report will do the following when it is run:

  • Select the items that met the filtering requirements. Note: only items with a replenishment type = Prod. Order will be selected.
  • Use the Calculation date to find the BOM and Routing version that should be used. (Find Last Record where Version Start Date <= Calculation Date.
  • Use the Calculation Date to find the BOM components where the Effective Start Date <= Calculation Date and End Date >= Calculation Date.
  • Use the “New Standard Cost” for the components in the Standard Cost Worksheet.
  • Use the Labor and Overhead costs for the Work/Machine centers in the Standard Cost Worksheet.
  • Calculate the new cost elements and new standard cost for the items selected.
  • Populate the following fields:
    • New Standard Cost
    • New Single Level Material
    • New Single Level Capacity
    • New Single Level Capacity Overhead
    • New Single Level Subcontract

Be sure to show all “New Single Level” cost fields and verify that they are correct. The New Standard Cost is the sum of the “New Single Level” cost fields. Changing the New Standard Cost field will change the standard cost, but the cost will not match the supporting details (BOM and Routing Information). NAV will prorate the cost elements based on the original cost roll percentage.

Dynamics NAV - New Single Level Cost Fields
Figure 7 - New Single Level Cost Fields

Once the costs have been reviewed and finalized the final step can be processed.

Step 4: Implement Standard Cost Changes

The Implement Standard Cost step pushes the new costs to the appropriate tables and revalues existing inventory to the new standard cost.

This report also has an option box that allows the user to control which items get implemented. The user can filter on fields in the Standard Cost worksheet when implementing the new standard costs.

Dynamics NAV - Standard Cost Change Option Box
Figure 8 - Standard Cost Change Option Box

The posting date should be the date the costs are being implemented. It should not be a date in the past, it has to be the date the standard cost is being pushed to the item card.

Note: if you backdate the posting date, NAV will only adjust the item ledger entries in inventory on the Posting Date. Any transactions received into inventory after that date will remain at the old standard cost.

Populate the Document No. field with information that will help you identify the reason for the cost change. For example “Cost Change 01/01/2018” would help identify the transactions as being the result of the January 1st cost change.

Populate the Journal Template and Batch name that should be populated when the revaluation journal is created.

Normally all items would be implemented at the same time, but there is the ability to implement the costs in waves.

Finally, once the costs have been implemented, post the revaluation journal that was created during the implementation of the new standard costs.

We hope this helps to explain the how and why of rolling standard costs in Dynamics NAV. If you have any questions about this process, or if you have some ideas of your own, please comment below.

View more How-To blogs from ArcherPoint.

Blog Tags: 

How Can I Try Microsoft Dynamics 365 Business Central?

$
0
0

How Can I Try Dynamics 365 Business Central?

Steps to Perform the Cost Roll Procedure in Microsoft Dynamics NAV

You may have heard that Microsoft announced the general availability of Dynamics 365 Business Central (MSDYN365BC) during Directions Asia for 14 countries (United States, Canada, United Kingdom, Denmark, Netherlands, Germany, Spain, Italy, France, Austria, Switzerland, Belgium, Sweden, and Finland), and be asking yourself, how can I try Dynamics 365 Business Central?

Recently Microsoft started offering 30-day trials for Dynamics 365 Business Central to users in other countries. It is an easy process and this blog will walk you through the steps.

To get started, navigate to the Business Central free trials home page.

This site will contain all Dynamics 365 product offerings by Microsoft that are available to use. Select the Dynamics 365 Business Central tile from the page as shown below.

Figure 1 - Microsoft Dynamics 365 Trial Home Page
Figure 1 - Microsoft Dynamics 365 Trial Home Page

It is quite easy to setup a MSDYN365BC trial: you only need a work email ID and phone number as shown below.

Figure 2 - Microsoft Dynamics 365 Get Started Window
Figure 2 - Microsoft Dynamics 365 Get Started Window

It will take some time to configure tenant as below.

Figure 3 - Setting Up Dynamics 365
Figure 3 - Setting Up Dynamics 365

After few minutes, you are ready to use the latest and greatest release by Microsoft (MSDYN365BC) with attractive navigation on the top and cues that help increase visibility across your business.

Figure 4 - Microsoft Dynamics 365 Business Central Role Center
Figure 4 - Microsoft Dynamics 365 Business Central Role Center

Dynamics 365 Business Central has capabilities that include an all-in-one business management solution, which automates and streamlines business processes and helps you manage your business. D365 Business Central integrates data across accounting, sales, purchasing, inventory, and customer interactions to get a birds-eye view of your business. If you have any questions about this function or other Dynamics NAV questions for any version, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

If you are interested in NAV development, check out our collection of NAV Development Blogs.

Blog Tags: 

How to Set Custom Color Themes in Microsoft Power BI

$
0
0

How to Set Custom Color Themes in Microsoft Power BI How to create custom themes in Microsoft Power BI

When publishing internal and external reports for your business it is important to be consistent with your branding standards by using the same color schemes and logos. Microsoft Power BI it a great tool for creating and publishing dynamic and interactive reports and it allows for the customization of colors to match your brand standards. This blog will provide instructions on how to use Microsoft Power BI to create reports you are proud to share.

Creating a JavaScript Object Notation (JSON) File

Power BI allows for a report creator to set the colors used on each visualization manually, and although this creates the desired result, it is time consuming. To set custom report color themes quickly and easily in Power BI that can be used repeatedly, you will need to enable the color themes option and create a simple JSON file of your preferred colors. If you haven’t worked with JSON before or don’t have experience writing code, have no fear; anyone can write the JSON needed for this simple customization.

  1. Enable Custom Report Themes

First, you need to enable custom report themes in Power BI using the desktop version of Power BI. Open a new Power BI desktop file. Select the File menu, click Options and settings, and select Options.

Figure 1 - Power BI File Menu
Figure 1 - Power BI File Menu

The Options window will open. In the Options window, on the left you will see a column of settings under the Global heading. Select Preview features. In the Preview features window, check the box for Custom report themes. Power BI will then prompt you to restart the program. (Please note, custom report themes are a Preview Feature in Power BI at the time this article is being written, hopefully in the future this feature will be standard and will not require this step).

Figure 2 - Power BI Options Menu
Figure 2 - Power BI Options Menu

Once you restart Power BI, you will then have a new icon for Switch Theme on the Home tab. This icon will now be present on any Power BI file opened in Power BI desktop going forward.

Figure 3 - Power BI Switch Theme Menu Option
Figure 3 - Power BI Switch Theme Menu Option

  1. Create the Custom Color Theme

Next, you will need to create the file that has your selected brand colors. You will create a JSON (JavaScript Object Notation) file that provides Power BI with the basic information it needs to fill in your chosen colors. If you haven’t written code before or haven’t worked with JSON before, have no fear, for this customization you will simply follow a basic template. You can write the color theme JSON file in a standard code-writing program like Visual Studio if you have it, or you can write in Microsoft Notepad. The custom color theme allows for the customization of four items: the eight standard colors used in the report visualizations, the report background, the report foreground, and the standard color used for table visualizations.

You can copy and paste the following JSON into Notepad (or code editing software). The colors must be expressed in hex code preceded by the pound sign #. If you are unfamiliar with hex code for colors, there are many websites available to help you convert standard RBG color codes to hex. The only portions of this code you want to change are the name and hex colors.

{

      "name": "Example Theme",

      "dataColors": [

           "#CE2A23",

           "#262261",

           "#6D6E71",

           "#F5D33F",

           "#007100",

           "#F07F09",

           "#26BCC8",

           "#8431B4"

      ],

      "background": "#FFFFFF",

      "foreground": "#808080",

      "tableAccent": "#CE2A23"

}

Your color theme must have a name and you must have at least one data color. The background, foreground, and table accent are optional. I recommend listing up to eight data colors. If you list fewer than eight colors, Power BI will select default colors for the remaining un-customized color options. If you list more than eight colors, the other colors will show up on your visualizations, but will not show up on the manual color selection drop down.

To remove the optional portions, simply delete out that section of text. For example, if you want the background and foreground to be the default Power BI colors (Power BI default foreground and background are white, hex #FFFFFF) and do not want to specify the table accent, you would use JSON that does not list these optional items:

{

            "name": "Example Theme",

            "dataColors": [

                        "#CE2A23",

                        "#262261",

                        "#6D6E71",

                        "#F5D33F",

                        "#007100",       

                        "#F07F09",

                        "#26BCC8",

                        "#8431B4"

            ]

}

Once you have your JSON code written save the file as a .json. If using Notepad, click to save and then on the file name, change the extension from .txt to .json

Figure 4 - Saving JSON Code
Figure 4 - Saving JSON Code

  1. Using Custom Color Themes

Now that you have created your custom color theme using JSON, you need to import it into your Power BI report. The custom color themes work best when starting a new Power BI report. You can apply the theme to an existing report, but will then have to update manually any visualizations that already exist.

Open a new Power BI desktop file, select the new Switch Theme button on the Home tab. Select Import Theme, and use the file explorer to find the .json file you created for your theme. You will then get a pop up to let you know your theme was imported successfully. If you receive an error, go back and look at your JSON code and make sure you aren’t missing a comma or quotation marks or if there is some other error present.

Figure 5 - Power BI Import Theme Option
Figure 5 - Power BI Import Theme Option

Figure 6 - Import Successful Confirmation
Figure 6 - Import Successful Confirmation

Now when you create visualizations, the colors will default to those you created in the JSON file. When you manually go to change colors inside of a visualization, your color options will also show up as those you specified in the JSON file. If you have applied your theme to an existing report, you will still have to update the colors on each existing visualization manually, but the theme colors to select from will be those from your custom theme.

Figure 7 - Custom Color Theme in Power BI
Figure 7 - Custom Color Theme in Power BI

Now your report will have your standard brand colors and you can have consistency across your company reports.

Visit the Microsoft Power BI community for premade color themes.

If you would like to learn more about utilizing Power BI in your business and the power of interactive and dynamic reporting, please contact our business intelligence team today.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Blog Tags: 

How To Disable Posting Negative Inventory in Microsoft Dynamics NAV

$
0
0

How toDisable Posting Negative Inventory in Microsoft Dynamics NAV How to create custom themes in Microsoft Power BI

Prior to Microsoft Dynamics NAV 2013 R2, developers had to customize Dynamics NAV to disable posting negative inventory, but in NAV2013R2 Microsoft have starting offering this feature as standard. One can now set up so that outbound posting that brings inventory below zero is blocked. This can be set up per item or for all items. We can put a check mark in Prevent Negative Inventory field, which specifies if you can post transactions that will bring inventory levels below zero. To do this, open Inventory Setup and Set Prevent Negative Inventory to True as shown below.

Figure 1 - Inventory Setup in Microsoft Dynamics NAV
Figure 1 - Inventory Setup in Microsoft Dynamics NAV

The selection that you make in this field indicates the value in the Prevent Negative Inventory field on individual item cards. The values will be either Default (Yes) or Default (No), which you can change.

You can check the Value in the Item Card as shown below. If you want to allow an item to post Negative Inventory then set No on this field for that item.

Figure 2 - Item Card in Microsoft Dynamics NAV
Figure 2 - Item Card in Microsoft Dynamics NAV

Once this is set up and you try to post an Item that has insufficient inventory, you will get an error message, as the system will not allow to Post Negative Inventory as shown below.

Figure 3 - Posting a Negative Adjustment for Quantity More than Inventory in Dynamics NAV
Figure 3 - Posting a Negative Adjustment for Quantity More than Inventory in Dynamics NAV

While a simple feature, ensuring it is setup correct from the start could save you time and frustration. If you have any questions about this feature or any other Microsoft Dynamics NAV questions, for any version, please contact us today, and one of our Dynamics NAV experts will be in touch.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV. In addition, if you are interested in Dynamics NAV development, please check out our collection of NAV Development Blogs.

Sales Shipment and Partial Invoicing for Lot Enabled Items in Dynamics NAV 2017

$
0
0

Creating a Sales Shipment and Partial Invoicing for a Lot Enabled Item in Dynamics NAVHow to create a sales shipment and partial invoice for Lot enabled items in Dynamics NAV 2017

We have discovered a bug in Microsoft Dynamics NAV 2017 when creating a sales order for lot enabled items. To use this functionality, we have created a workaround so that you can create a sales order for a lot enabled item including the full shipment and partial invoice. This blog will walk through the steps required.

Before getting started, be sure that your item is an enabled lot and that you have enough stock in two different lots.

The following example, which illustrates the effect of the shipment, is based on the following scenario for an item that uses the lot. To get started:

  1. Create a Sales Order from the Home screen → Sales Orders → New
  2. Enter the all mandatory header information such as customer name and posting date details
  3. Select the Item no. in line level (ex: 80001)
  4. Enter the quantity 50
  5. Select the Item Tracking Entries from Lines → Related Information → Item Tracking Lines
  6. Select the Entries from the Item Tracking page action → select Entries. Press OK.

Figure 1 - Item Tracking Lines in Dynamics NAV 2017
Figure 1 - Item Tracking Lines in Dynamics NAV 2017

To create an Item Tracking Line with an invoiced quantity, simply:

  1. Post the Sales Order → select option Only Ship. Press OK. Sales order has shipped 50 quantities.
  2. Change the value in Quantity to invoice 5 and again post the Sales Order → select the option Only Invoice.
  3. Now the document is posted and the quantity invoiced equals 5.

Figure 2 - Item Tracking Lines with Invoiced Quantity
Figure 2 - Item Tracking Lines with Invoiced Quantity

To ensure there are no tracking lines issues:

Check the item tracking lines from Lines → Related Information → Item Tracking Lines → Quantity invoiced (base) value is 10. That is wrong. It should be 5.

Figure 3 - Error While Posting Sales Invoice
Figure 3 - Error While Posting Sales Invoice

Check the item tracking lines from Lines → Related Information → Item Tracking Lines. Then try to modify the Quantity to Invoice (base), and the system throws the error.

Figure 4 - Item Tracking Line, Modify Quantity
Figure 4 - Item Tracking Line, Modify Quantity

We have also tested this workaround with the latest cumulative update of Dynamics NAV 2018 and it worked. We have reported this issue to Microsoft. We will post an updated blog once we receive update from them.  Until we know the bug has been fixed, if you have a transaction like this please update Item Tracking Manually before partially invoicing.

If you have questions about this issue or any development related issue in Microsoft Dynamics NAV, please visit our website and be sure to subscribe to our developer blogs to stay abreast of Dynamics NAV developer related blogs.

Blog Tags: 

Two Options for Running Adjust Cost in Dynamics NAV When It Has Not Been Done Regularly

$
0
0

Options for Running Adjust Cost in Dynamics NAV When It Has Not Been Done in a While

How to Run Adjust Cost in Dynamics NAVRunning a successful business requires the ability to plan, forecast, and make strategic business decisions. To make these kinds of effective decisions you need access to reliable data: you need to know, on a real-time basis, what your costs and profits are.

Fortunately, with Microsoft Dynamics NAV, the system does that for you: it updates your costs and subsequent profits on an ongoing basis. However, to ensure your costs and profits are reconciled correctly there is still a manual process required, the adjust cost function. To stay current, this process should be run monthly. However, we understand that this doesn’t always happen and companies need a way to run adjust cost even if it has not been done in quite some time.

This blog covers the two options available for running adjust cost in Dynamics NAV when it has not been done in some time.

Option 1: Test Running Adjust Cost in a Test Database

One option is to run the adjust cost function in a test database so as not to affect your production database and disrupt any on-going processes. To do so:

  1. Take a copy of production and put two copies into the test database. One copy will be used to run adjust costs; the other will serve as a comparison for posting effects.
  2. Look for expected errors such as:
    • Blocked dimension
    • Deleted dimensions
    • Changed G/L Accounts Dimension Rules
  3. Take note that the cost will be posted backwards in time. If years have passed, this will impact previous financials.

Option 2: Create an Artificial “Restart” of Inventory Valuation

Another option for running adjust cost for previous timeframes is to create an artificial restart of inventory valuation, to do this:

  1. Determine the average cost per unit before adjusting the inventory out to make sure it is adjusted in and ties to the old inventory balance.
  2. Remove your inventory on hand by adjusting the on hand quantities out of inventory.
  3. Force all transactions to appear as the entries had been run by Adjust Cost Entry. It is important to note that you will need to set the flag on the transactions so that NAV reads all as adjusted.
  4. Then, bring back in inventory.
  • Use the average cost from step (1) so that the inventory value matches previous G/L Balance.
  1. Make a change to the following reports so they ignore all value entries before the restart date. The below reports would be set to look only at the value entries with Posting Dates > the restart date.
    • Adjust Cost Entry
    • Inventory to G/L Comparison
    • Inventory Valuation
  2. Create a new set of items, move inventory from old item to new item, and force all old items to appear as if the entries were run by Adjust Cost Entry.
  3. Do a reimplementation in a new company.
    • Use Rapid Start to migrate all current setup tables.
    • Rapid Start all Master tables (vendor/item/customer)
    • Adjust inventory in at the current average cost per unit
    • Migrate over open sales/purchase/production orders

Each option is viable and can help reconcile your costs: one is not inherently better than the other one.

We hope this helps to explain the options on running adjust cost for previous timeframes in Dynamics NAV. If you have any questions about this process or if you have some ideas of your own, please comment below.

View more How-To blogs from ArcherPoint.

Contact Us for help running Adjust Cost in Microsoft Dynamics NAV.

Automated Intercompany Transactions in Microsoft Dynamics NAV 2018

$
0
0

Automated Intercompany Transactions in Microsoft Dynamics NAV 2018 How To Automate Intercompany Transactions in Microsoft Dynamics NAV 2018

Previous versions of Microsoft Dynamics NAV provided users with the facility to complete intercompany transactions, ensuring that both parties were provided with accurate records of these transactions. However, the previous process was manual – and time consuming. Taking care of sales and purchase invoices was a multi-step process that had to be repeated for every transaction.

Updated and Automated

This was updated with Microsoft Dynamics NAV 2018, improving efficiency by automating this process. Specifically, when two companies are engaged in sales and purchase transactions, this facility ensures that both parties receive the appropriate invoices every time a transaction is made: the seller receives a sales invoice and the buyer receives a purchase invoice without individual manual processes.

How it Works

Once two companies are engaged in sales and procurement transactions, it’s possible to set up the automation process. This is illustrated below, using Cronus USA as the buyer and Cronus Mexico S.A. as the seller.

Create Company Information Setup

Navigate to the selling company's communication tab. In our example, we navigate to Cronus Mexico S.A./departments/administration/application setup/general/company information/communication tab

  1. IC Partner Code → ICP20
  2. IC Inbox Type → Database
    Figure 1 – Intercompany Partner Code on the Selling Company’s Communication Tab in Dynamics NAV 2018
    Figure 1 – Intercompany Partner Code on the Selling Company’s Communication Tab in Dynamics NAV 2018

Create Intercompany Setup

The following is used to send intercompany sales invoices automatically without storing intercompany outbox transactions:

Navigate to the selling company's intercompany setup under Financial Management. In our example, we navigate to Cronus Mexico S.A./departments/financial management/setup/intercompany postings/intercompany setup

  1. Intercompany Partner Code → ICP30
  2. Auto. Send Transactions → true / checked (new setup)
    Figure 2 – Intercompany Setup in Dynamics NAV 2018
    Figure 2 – Intercompany Setup in Dynamics NAV 2018

Intercompany Partner Setup

In our example, navigate to Cronus Mexico S.A./departments/administration/application setup/financial management/intercompany postings/intercompany partners

  1. In the Intercompany Partners window, complete the fields as necessary.
  2. For ICP20, inbox details should be Cronus USA (the buying company).
  3. Auto. Accept transactions should be checked (new setup on NAV 2018).

Please note that it helps to accept the IC Inbox Transactions automatically. This is handled using task scheduler/job queue within a time interval, and the document gets accepted automatically.
Figure 3 – Intercompany Partners Setup
Figure 3 – Intercompany Partners Setup

Intercompany Partner Code Setup in Vendor Card

Navigate to Cronus Mexico S.A./departments/purchasing/planning/vendors/ic1020

Once there, set IC Partner Code as ICP20.
Figure 4 – Vendor Card Partner Code in Dynamics NAV 2018
Figure 4 – Vendor Card Partner Code in Dynamics NAV 2018

Intercompany Partner Code Setup in Customer Card

Navigate to Cronus Mexico S.A./departments/purchasing/planning/vendors/ic1030

Once there, set IC Partner Code as ICP20.
Figure 5 – Partner Code Setup on the Customer Card
Figure 5 – Partner Code Setup on the Customer Card

Company Information Setup

The following example continues to use Cronus USA purchasing product from Cronus Mexico S.A. to demonstrate how to setup Company Information in Dynamics NAV 2018 for automated intercompany transactions.

Navigate to CRONUS USA/departments/administration/application setup/general/company information/communication tab

  1. IC Partner Code → ICP30
  2. IC Inbox Type → database
    Figure 6 – Setup Intercompany Partner on the Buying Company’s Company Information Card
    Figure 6 – Setup Intercompany Partner on the Buying Company’s Company Information Card

Intercompany Setup

Navigate to CRONUS USA/departments/financial management/setup/intercompany postings/intercompany setup

  1. Intercompany Partner Code → ICP30
  2. Auto. Send Transactions → true / checked (new setup)
    Figure 7 – Edit Intercompany Setup for the Buying Company
    Figure 7 – Edit Intercompany Setup for the Buying Company

Intercompany Partner Setup

Navigate to CRONUS USA INC./departments/administration/application setup/financial management/intercompany postings/intercompany partners

  1. In the Intercompany Partners window, complete the fields as necessary.
  2. For Partner Code → ICP30, inbox details should be Cronus Mexico S.A.

Auto. Accept Transactions should be checked (new setup on Microsoft Dynamics NAV 2018).
Figure 8 – Intercompany Partners Setup in NAV 2018
Figure 8 – Intercompany Partners Setup in NAV 2018

Vendor Card Setup

Navigate to CRONUS USA/departments/purchasing/planning/vendors/ic1030

Once there, set the IC Partner Code = ICP30
Figure 9 – Vendor Card Setup for the Buying Company
Figure 9 – Vendor Card Setup for the Buying Company

Customer Card Setup

Navigate to CRONUS USA/departments/purchasing/planning/vendors/ic1030

Once there, set the IC Partner Code = ICP30
Figure 10 – Vendor Setup for Intercompany Automation
Figure 10 – Vendor Setup for Intercompany Automation

Create and Post Sales Invoice from Company (Cronus Mexico S.A.)

  1. Open the customer IC020
  2. Go to action → click Sales Invoice
  3. New sales invoice created
  4. In sales lines → select Type → item and no.→ 1000
  5. Make sure IC Partner Ref. Type and IC Partner Reference are equal to sales line Type and No.
  6. Release and post sales invoice
  7. Refer to the screenshot below:
    Figure 11 – Steps to Create and Post an Intercompany Sales Invoice
    Figure 11 – Steps to Create and Post an Intercompany Sales Invoice
  8. Once the document is posted successfully, open the second company, Cronus USA, and check the IC Inbox Transactions from CRONUS USA/departments/financial management/general ledger/intercompany inbox transactions.
    1. Check the document no.
    2. Check the action → Accept (This is according to Intercompany Partner Setup, above).
    3. Click the action → details; to view the complete document.
    4. Click “complete line action”.
    5. A new purchase invoice is created in company Cronus USA.Figure 12 – Intercompany Inbox Transactions
      Figure 12 – Intercompany Inbox Transactions
  9. Open the purchase invoice and post the transactions. The document is then posted.

Automating intercompany transactions is another time-saving reason to consider an upgrade to Microsoft Dynamics NAV 2018. For a free upgrade estimate, request our upgrade estimate worksheet, so you can budget for your next Dynamics NAV upgrade.

For more information on this or other Microsoft Dynamics NAV topics, please contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV.

Costing and Production Options in Microsoft Dynamics NAV

$
0
0

Costing and Production Options in Microsoft Dynamics NAV 

How To Add Costing and Production Options in Microsoft Dynamics NAV 2018

Microsoft Dynamics NAV can help companies in so many ways: streamlining accounting procedures, simplifying invoicing, and increasing efficiency of supply chain operations to name just a few. However, the software’s effectiveness is only as good as its use. We often find clients who have forgotten to conduct regular processes. While not an ideal situation, there is a solution in most cases. This blog covers options for including costing and production in Dynamics NAV after the software has been implemented and used.

Actual Situation

In this instance, there was a client who was not putting their transportation costs into Dynamics NAV. Sometimes they used their own trucks to deliver products, other times they used a third party. But at no time were they inputting that information – and associated cost – into NAV. They were running Dynamics NAV 2016 and hadn’t included any transportation data into the system or “closed” their inventory periods since they went live in 2012. 

We did some analysis and determined a three-cost breakout: ranch, processing for sales, and processing for transportation:

  • Ranch: farm costs to produce the egg
  • Processing for Sales: clean and package eggs, labor, overhead, and (if applicable) cost to move to off-site storage
  • Processing for Transportation: sales cost to customer (not 100% if off-site storage cost is included)

Figure 1 - Inventory Setup in Dynamics NAV
Figure 1 - Inventory Setup in Dynamics NAV

Our Solution

As a solution, we developed a three-pronged approach to fill in the gaps created by lack of reporting.

Ranch Expectations

  • Transactions are processed with global dimension of Cost Center
  • All GL Accounts are used when applicable in the ranch calculation with a filter of global dimension one, called “Cost Center”

Processing: Sales

At the time of sale, ranch cost is added to the production order. This is done by creating a positive item journal adjust and cost defaulting from the item card to add the egg to the inventory. The cost is set manually based on the ranch calculation from an Excel activity. The business plan then updates the item card cost monthly.

Prior to the time of sale, there are three other options:

  • Create a contra account (preferred)
  • Create an internal customer to buy and sell from the ranch
  • Create a contra account subcontracting to the ranch

Processing: Transportation

As the ranch uses their own vehicles 95% of the time, the transportation cost process is invoiced to an internal vendor via a contra account. Components of the process were comprised of the ranch cost (i.e. the egg), packaging material, and any other raw material/overhead. Following, routing for labor is set up as new and the PRO is closed.

The cost for transportation is built into the price of the item, unless it is not an egg. In that case, it is added to the sales order.

The following is an example of a contra account setup:

Figure 2 - Contra Account Setup in Dynamics NAV Chart of Accounts step 1
Figure 2 - Contra Account Setup in Dynamics NAV step 1 Chart of Accounts 

Figure 3 - Contra Account Setup in Dynamics NAV step 2
Figure 3 - Contra Account Setup in Dynamics NAV step 2 Vendor Posting Groups

Has your company neglected to capture everything in Dynamics NAV that impacts cost of goods? Are you consistently closing your accounting periods? If you need to improve your business processes and properly capture data in Dynamics NAV, ArcherPoint can help. Please contact us to discuss your needs.

If you have any questions about this process, or if you have some ideas of your own, please comment below. You can also check out more How-To blogs from ArcherPoint.

 

Blog Tags: 

Workflows in Microsoft Dynamics NAV 2018

$
0
0

How to Use Workflows in Microsoft Dynamics NAV 2018 

How to use Workflows in Microsoft Dynamics NAV 2018

Defined as a sequence of steps completed to achieve a common goal, Workflows in Microsoft Dynamics NAV 2018 can be used to streamline business tasks and automate the outcomes of those tasks. A Workflow is similar to the IFTTT model – If This, Then That – and features the following components:
Figure 1 – Workflow Steps in Dynamics NAV 2018
Figure 1 – Workflow Steps in Dynamics NAV 2018

The steps in Figure 1 function as follows:

  • Event: initiates the Workflow process
  • Condition: scenario under which a Workflow should process
  • Response: desired outcome of the Workflow

When strung together, these Workflow steps can supplement a wide range of day-to-day activities and make business processes more efficient through automation.

There are many ways to use Workflows in Dynamics NAV, including:

  • Automate approval of various documents (Sales Invoice, Sales Quote, etc.)
  • Provide notification of Vendor / Customer / Item detail updates
  • Receive invoices to approve in email
  • Automate Sales Invoice posting after approval
  • Process Incoming Documents

Dynamics NAV has user-friendly and self-explanatory Workflow templates to help users set up Workflows easily.

Creating a Sample Workflow

To illustrate how to create a Workflow, we will use a notification for vendor detail changes as an example. To do so, follow these steps:

  1. Navigate to Departments/Administration/Application Setup/Workflow/Workflows
  2. Click ‘New Workflow from Template’
  3. Fill the Code, Description, and Category as shown below:
    Figure 2 – Create a New Dynamics NAV Workflow from Template
    Figure 2 – Create a New Dynamics NAV Workflow from Template

  4. Fill in ‘When Event’ as a Vendor record is changed. Click on the Assist Edit button in Then Response field to open a Workflow response window
  5. Click on the dropdown in Select Response field and choose ‘Create Notification %1’as shown below and fill in the Recipient User ID
    Figure 3 – Dynamics NAV 2018 Workflow Response Screen
    Figure 3 – Dynamics NAV 2018 Workflow Response Screen 

  6. Mark the Enabled Field to activate the Workflow:
    Figure 4 – Enable the Workflow Step
    Figure 4 – Enable the Workflow Step

  7. You can update details like Payment Method Code, Responsibility, etc. for a vendor. After completing this step, you will receive an email as below:
    Figure 5 - Confirmation Email
    Figure 5 - Confirmation Email

One of the best things about the Workflow functionality is that you can use and customize it to your specific business needs without the need to customize the base Dynamics NAV application. This is just one of the many new features and functionalities of the more recent versions of Dynamics NAV. To ensure your company is getting the most out of your software, be sure to keep your Dynamics NAV version current.

For practical advice on using Microsoft Dynamics NAV, go to ArcherPoint’s "How To" blogs. If you have specific questions and want to learn more, you can contact ArcherPoint.
Blog Tags: 

Managing User Tasks in Microsoft Dynamics 365 Business Central

$
0
0

Managing User Tasks in Microsoft Dynamics 365 Business Central

Manage User Tasks in Dynamics 365 Business Central

Efficiency and organization are critical for businesses at every level. Microsoft Business Central provides the features you need to ensure that tasks are completed efficiently and without getting lost in the process. In this blog, we’ll look specifically at how User Tasks provides the capability to implement and manage the following:  

  • Creating User Tasks/Recurring User Tasks
  • Assigning User Tasks
  • Monitoring User Tasks
  • Completing User Task

From creating and assigning tasks to monitoring and completing them, User Tasks in Business Central gives users control over every aspect of process.

Getting Started with Business Central User Tasks

To begin, search User Task in the search field at the top right corner of the screen. This will provide User Task options as seen in the screen below.

Figure 1 - Search for User Task
Figure 1 - Search for User Task

Creating User Tasks

To create a new User Task, select NEW and complete the required fields as shown below. At this point, you can also assign this task to another user by selecting User Assigned To. Further, you can also specify % Complete to track task progress.

Figure 2 - Creating a User Task in D365 BC
Figure 2 - Creating a User Task in D365 BC

Creating Recurring User Tasks

Recurring User Tasks are a great way to ensure that important tasks are completed on time as needed. For example: need to monitor a balance report monthly? Set the task and recurrence period as needed to provide a consistent reminder.

To create a new Recurring User Task, complete the fields shown below. Then click on the highlighted Recurrence.

Figure 3 - Create Recurring Task in D365 BC
Figure 3 - Create Recurring Task in D365 BC

After clicking, a new window will pop up allowing you to specify the Recurring Start Date. The Recurrence listed as CM+1D will create monthly recurring task. The specific number of occurrences can also be scheduled. In the field below, 12 has been specified to create 12 Monthly User Tasks. After completing these fields, click on OK.

Figure 4 - Recurrence Details
Figure 4 - Recurrence Details

As below, you can view the 12 User Tasks created with a monthly due date of the 1st of every month.

Figure 5 - Recurring User Task
Figure 5 - Recurring User Tasks

In the Business Manager, Bookkeeper, and Accountant Role Centers, a tile shows pending tasks assigned to the individual user. To pick up a task, simply select it from the list of pending user tasks. In the ribbon, the Go to Task Item link opens the window where you can do the work. Image 6 Shows the Pending User Task.

Figure 6 - Pending Users Tasks in the Role Center
Figure 6 - Pending Users Tasks in the Role Center

You can check the task from the role center by clicking on the Pending User Tasks. This will show the details.

Figure 7 - Pending User Task Details
Figure 7 - Pending User Task Details

Once you’ve completed the task, simply mark it as Completed.

 

If you need to delete some or all User Tasks, you can use the Delete User Tasks report. From the request page, you can set filters to determine which tasks will be deleted.

More than just tracking jobs, User Tasks in Microsoft Business Central provides powerful functionality offering specific completion status, reminders, and the ability to constantly update progress. Please note that this feature is available from Microsoft Dynamics NAV 2016 and higher versions.

 

For more information and professional advice on Microsoft Dynamics 365 Business Central, contact ArcherPoint.

Dynamics NAV Coffee Break: How to Personalize Columns in Dynamics 365 Business Central

$
0
0

Dynamics NAV Coffee Break: How to Personalize Columns in Dynamics 365 Business CentralHow To Personalize Dynamics 365 Business Central Columns

This Dynamics NAV Coffee Break provides clear, step-by-step instructions for modifying and personalizing columns in Dynamics 365 Business Central. The video will walk you through how to select exactly what you do or don’t want to see as well as how to resize, reorder, add, or delete columns. Follow along to learn how to personalize your Business Central environment and revert back to defaults if desired.

 

You can find more Coffee Break videos for Dynamics NAV and Dynamics 365 Business Central on the ArcherPoint Coffee Break playlist.

If you’ve got questions or would like to learn more about Dynamics 365 Business Central, please contact ArcherPoint.

How to Use Item Attributes in Microsoft Dynamics NAV 2017

$
0
0

How to Use Item Attributes in Microsoft Dynamics NAV 2017 

How To Use Item Attributes in Microsoft Dynamics NAV 2017

A leading enterprise resource planning (ERP) software suite, Microsoft Dynamics NAV provides users with a range of specialized functionalities to enable better organization and control of assets. Central to this are the facilities that allow users to customize organization to best suit their business needs.

In this video How To video blog, we’ll focus specifically on using Item Attributes in Microsoft Dynamics NAV 2017 to modify inventory. More specifically, we’ll show you how you can add information and attributes as well as how to modify this information as and when needed.

For more advice and information on using Microsoft Dynamics NAV, please see ArcherPoint’s “How To” blogs. If you have specific questions or would like to learn more about how ArcherPoint can help you with Microsoft Solutions and Services, please contact us.

Blog Tags: 

Dynamics NAV Coffee Break: How to Create Default Expense Accounts for Vendors in Dynamics 365 Business Central

$
0
0

How to setup default vendor G/L codes in Microsoft Dynamics 365 Business Central

Dynamics NAV Coffee Break: How to Create Default Expense Accounts for Vendors in Dynamics 365 Business Central

This Dynamics NAV Coffee Break provides simple, easy to follow instructions that explain how to create default expense accounts for vendors in Dynamics 365 Business Central. Many companies have vendors who send invoices monthly, and always with the same GL account. In this video, we show you how to skip the step of having to enter that account every time with step by step instructions on how to set up default general ledger accounts by Vendor for purchase invoices.

 

You can find more Coffee Break videos for Dynamics NAV and Dynamics 365 Business Central on the ArcherPoint Coffee Break playlist.

If you have questions or would like to learn more about Dynamics 365 Business Central, please contact ArcherPoint.

The video transcript follows:

Gwen Britt:         Welcome to today's Coffee Break. Today we're going to talk about default expense accounts on the vendor cards (in Microsoft Dynamics 365 Business Central). A lot of times people want to know, I have a vendor, they send me an invoice every month. It's always the same GL account and I don't want to have to go through and select that GL account every time. This is one way that you can default that.

Let's just jump right in. I'm going go to the vendor card. We're using something called the recurring lines to do this. Go to the vendor. We'll just pick our 'First Up Consultants' record. Once you're in the vendor card you can go to navigate, purchases, and we're looking for the recurring purchase lines. Just so you know, the process is the same on the sales side, but for today we're doing the vendor setup.

See the recurring purchase lines? Click on that. I need to create a code for this particular purchase line. What I want to do for the code is I want to put the vendor's account because this is the default for that vendor's account. Technically, you could have one code that goes to multiple vendors, but just to make things easy I'm going to do a one to one relationship.

This is the default account for this vendor. I actually have one. Let's take a look at it. Let's do a new one so you can see it done. What I want to do is, this is their code, and this is their name. I'm gonna put the name in here first up. Open. Okay.

If there is a currency code that needs to be defaulted we can select that here. And now, what we do is we're entering the lines. We have a few options here. We can put default comments, G/L accounts, item, fixed asset, or charge item. In this case, these are consultants and I want to select G/L account. What will happen is once I've created this recurring code, or these recurring lines, they will get applied to the purchase invoice that comes in and the default account will be established on that invoice.

I click on the G/L account. I have a miscellaneous expense account. I'll use that. I'm going to overwrite the description and just say it's business consulting. I'll put a quantity of one. We'll see this come into the lines. Like I said, you could put multiple lines in here. You could have in other instances a bunch of items, maybe a G/L account for freight, you could put in fixed assets. You have a lot of flexibility but today's purposes I just want to show you setting up a very simple expense account.

I click okay. Now, I can choose basically what I want to have happen with this code. I can say, okay, go ahead and insert the recurring lines on quotes. We'll have it ask. Go ahead and insert the recurring lines on orders. Again, I'm going to set that to always ask. Insert the recurring lines on invoices, always ask, and on credit memos, always ask.

Now that has been set let's go ahead and see this in action. I can go to new document. We'll go ahead and create a purchase invoice. As soon as I press enter I get this pop-up at the top that says recurring purchase lines exist for the vendor, do you want to insert them into the document? Remember, we said always ask. Well, there you go.

I'm going to go ahead and click on get recurring lines and here it is. This is the one I created and I click okay. I could've overwritten this description to be business consulting or something. It just defaulted to the name of the vendor. You can change that so that it's a little more meaningful to you in case you have multiple codes.

I'm just going to click this line, okay, and now it enters the G/L account line with that miscellaneous expense, and my description, and a quantity of one. I could overwrite that and say, okay, it's 40 hours this time and here's the rate, and now I'm ready to post.

This eliminates some of that guessing as to which accounts to use for which vendors. It makes it a little easier. That concludes today's Coffee Break. I hope you find this useful.

Thanks for watching this ArcherPoint video. If you found it helpful make sure to check out our website, and blog, at www.archerpoint.com. Additionally, if you have any questions regarding our products, services, or information in this video feel free to email us at info@archerpoint.com. Thanks. 

Navigating and Optimizing Power BI for More Effective Reporting

$
0
0

How to Navigate and Optimize Power BI for More Effective ReportingHow To Navigate and Optimize Power BI

Microsoft Power BI is a reporting and analytics tool that can analyze data from a myriad of sources, including Microsoft Dynamics NAV, Excel, Google Analytics, social networks, APIs, Odata feeds, and more. Power BI allows for creation of interactive KPIs, charts, graphs, matrices, and other visuals to product unique and meaningful reports you can use to understand your business in real time. If you are new to Power BI—or if you’re looking for some best practice—the following guide will walk you through the basics of navigating reports and visuals, filtering the data, asking questions of the reports, and much more.

Navigating Power BI Reports: Getting Started

To access Power BI as part of your Office 365 account, open your browser and log in to Office 365, then select the menu icon in the top right of the browser window and select Power BI.

Figure 1 – Microsoft Office 365 Menu
Figure 1 – Microsoft Office 365 Menu

Figure 2 – Microsoft Power BI icon in the Office 365 menu
Figure 2 – Microsoft Power BI icon in the Office 365 menu

When Power BI opens, select Shared With Me or Workspaces on the left side menu to access your reports or reports that have been shared with you.

Figure 3 – Select “Shared with me” from the Microsoft Power BI side menu
Figure 3 – Select “Shared with me” from the Microsoft Power BI side menu

Viewing Power BI Dashboards and Reports

Once you are in Power BI in your Workspaces or Shared With Me lists, you can select the Dashboard or Reports view of the reports with which you want to interact.

Figure 4 – Select “Dashboards” from the Microsoft Power BI workspace
Figure 4 – Select “Dashboards” from the Microsoft Power BI workspace

If you select from the Dashboard list, you can view a report or items on a report and scroll down to see more pages of the Dashboard. Dashboards can be the entire report or only specific visuals from a report. The Dashboard view allows for some filtering, depending on how the report has been set up, but often there are limitations or no filtering available. If you want to use filters for a fully interactive experience, click the report name in the top left corner of the Dashboard to be taken to the Report view, which enables all filtering capabilities.

Figure 5 – From the Microsoft Power BI Dashboard, click on the report name to view and filter
Figure 5 – From the Microsoft Power BI Dashboard, click on the report name to view and filter

You can also return to your Workspaces or Shared With Me list and select the Reports list to access the Report view. In the Report view, instead of scrolling down to see all pages of the report, you will see tabs at the bottom of your screen to select for each page. This view allows for filtering and more interaction with the visuals.

Figure 6 – To view a page in a report in Microsoft Power BI, use the Reports tabs
Figure 6 – To view a page in a report in Microsoft Power BI, use the Reports tabs

Filtering in Power BI for Meaningful Reports

Part of what makes Power BI a great reporting tool is that the reports have interactive filtering. In either the standard Dashboard view or in Report view, you as the end user control the filters for the data. Reports have buttons and toggles to filter the graphs and tables displayed.

Many Power BI reports require you to interact and use the filters for the graphs and visuals to be meaningful; without selecting a filter on some reports, there is too much data displayed or totaled to be useful. For example, the following graph shows the utilization for all resources at once…not very helpful without filters.

Figure 7 – A Microsoft Power BI report with no filters—not helpful!
Figure 7 – A Microsoft Power BI report with no filters—not helpful!

However, when you filter it, you get clear results showing trends for comparison.

Figure 8 – A Microsoft Power BI report with filters—clear, actionable results
Figure 8 – A Microsoft Power BI report with filters—clear, actionable results

To filter a chart or visual, you can click buttons, toggle boxes, or even the visual itself. On the report shown here, you can select the blue buttons to filter the graph by Department.

Figure 9 – A visual in Microsoft Power BI filtered by Department, accomplished by clicking a button
Figure 9 – A visual in Microsoft Power BI filtered by Department, accomplished by clicking a button

Or you can check a toggle box to filter the graph by Division.

Figure 10 – A visual in Microsoft Power BI filtered by Division, accomplished by checking a toggle box
Figure 10 – A visual in Microsoft Power BI filtered by Division, accomplished by checking a toggle box

You can use multiple filter options to show different combinations. In the example below, the filters are set for the graph to show the Nonrecurring service sales for the CSV Department in the Northwest Division.

Figure 11 – A visual in Microsoft Power BI with multiple filters set
Figure 11 – A visual in Microsoft Power BI with multiple filters set

Graphs and visuals themselves can also act as filters when you click items inside the visual. Notice how clicking the Recurring (blue) section of the column in the graph also filtered the Total Services Sales by Department table below it.

Figure 12 – A graph or visual in Microsoft Power BI can also act as a filter; just click on an item in the visual
Figure 12 – A graph or visual in Microsoft Power BI can also act as a filter; just click on an item in the visual

If you hover over a graph or visual, an information box will appear and give you the details of that portion of the graph.

Figure 13 – Hover over a specific area within visual in Microsoft Power BI to get the details of that area
Figure 13 – Hover over a specific area within visual in Microsoft Power BI to get the details of that area

To clear filters, unclick your selections or refresh your browser window. If you are in Report view click the Reset to Default button in the top right to clear your filter selections.

Figure 14 – To clear filters in a Microsoft Power BI visual, unclick selections or refresh your browser window
Figure 14 – To clear filters in a Microsoft Power BI visual, unclick selections or refresh your browser window

In Report view, you will see a Filters bar minimized on the right side of the screen. These are the filters applied in the development environment for the Power BI report and if you change them the report will not function as intended. If you have changed them by accident, click the Reset to Default button or refresh your browser window.

Figure 15 – The Filters bar on the side of a visual in the Report view in Microsoft Power BI contains filters applied that should NOT be changed
Figure 15 – The Filters bar on the side of a visual in the Report view in Microsoft Power BI contains filters applied that should NOT be changed

Using Focus Mode in Power BI to Help with Hard-to-Read Visuals

Charts and visuals sometimes contain many lines of data or are small and hard to read, especially if being viewed on a small screen. You can enter Focus Mode on any visual to enlarge it to fill the screen for better viewing. Make sure you are in the Report view, then set the filters and parameters as you wish and select the visual or table you want to zoom in on. When you select the visual, icons appear in the top right corner of the visual’s box. Select the Focus Mode icon Focus mode icon in Power BI and the visual will expand to fill the screen.

Figure 16 – To get a better view of a visual in Microsoft Power BI, use Focus Mode
Figure 16 – To get a better view of a visual in Microsoft Power BI, use Focus Mode

In Focus Mode:

Figure 17 – A view of a visual in Microsoft Power BI after using Focus Mode
Figure 17 – A view of a visual in Microsoft Power BI after using Focus Mode

To return to the full report, click the Back to Report button at the top left of the Focus Mode window.

Exporting Data from Power BI into Excel, CSV, and More

Power BI allows you to export the data from reports into Excel or as a CSV file if you have a desire to look at the information in a table in a different way.

To export data from a visual or table in Power BI, you must be viewing the report in the Report view. Once in Report view, select the visual or table you want to export. Be aware: The filter buttons and toggles will not apply to your exported data. When you select the visual, icons appear in the top right corner of the visual’s box. Select the ellipses (…) icon, then select Export Data.

Figure 18 - To export data from a Microsoft Power BI report, visual, or table, view the report in Report view, select the ellipses icon, then select Export Data
Figure 18 - To export data from a Microsoft Power BI report, visual, or table, view the report in Report view, select the ellipses icon, then select Export Data

The Export Data window will open. Select Summarized data and then select the File Format you wish to use Excel or CSV. Click Export, and the file will be created and downloaded for you to view.

Exported data will be in Excel in a table you can filter, sum, or use any other Excel functionality with. The filters displayed at the top of the Excel sheet are not from the filter buttons you might have selected on the Power BI report, as those do not carry over to the exported data. The “Applied filters” text in your export refers to the filters set up in the development environment for the Power BI visual.

Figure 19 – Data exported from Microsoft Power BI into Excel
Figure 19 – Data exported from Microsoft Power BI into Excel

Asking Questions About Reports in Power BI

Power BI has a natural language query that allows you to ask a free-text question about the data in a report and receive an answer. However, this functionality can be very hit or miss, depending on the development and setup for the report. When using this feature, use words that are common for financial reporting and/or words that appear in the report itself.

In Dashboard view, you’ll see an icon to Ask A Question About Your Data in the top right corner. Click the icon and you’ll be taken to the Q&A window.

Figure 20 – Ask A Question feature in Microsoft Power BI, in Dashboard view
Figure 20 – Ask A Question feature in Microsoft Power BI, in Dashboard view

In the Q&A window, type your question or a phrase about the report data in the Ask A Question About Your Data box, and an answer will appear.

Figure 21 – To ask a question in the Ask A Question feature in Microsoft Power BI, type your question into the Q&A window
Figure 21 – To ask a question in the Ask A Question feature in Microsoft Power BI, type your question into the Q&A window

Results can be a number or a filtered visual, depending on what you type in. The quality of the results varies depending on the naming and setup used for the report’s development and the raw data behind it. As you type in the Q&A Ask a Question box, you will see that Power BI will suggest data names and filters for you. Use these suggestions to get better matches for your queries. Any words in your inquiry that Power BI has suggestions for will be underlined in yellow. You can also click the gray suggestion buttons at the bottom of the window to use as your inquiry.

Figure 22 – Example of suggestions offered in the Ask A Question feature in Microsoft Power BI
Figure 22 – Example of suggestions offered in the Ask A Question feature in Microsoft Power BI

Here are two examples of a Q&A result, one where a chart is provided in response to the inquiry and one where a total amount is provided. If you are struggling to get good results from the Q&A, try using the drop-down suggestions offered by Power BI as you type in your inquiry.

Figure 23 – Ask A Question result in Microsoft Power BI, presented in the form of a chart
Figure 23 – Ask A Question result in Microsoft Power BI, presented in the form of a chart

Figure 24 – Ask A Question response in Microsoft Power BI, presented as a number/amount
Figure 24 – Ask A Question response in Microsoft Power BI, presented as a number/amount

Subscribing to See Power BI Reports on a Regular Basis

If there is a Power BI report that you want to see on a regular basis, instead of visiting SharePoint or Power BI every day, you can have a snapshot of the report emailed to you. You can subscribe to get an emailed picture of the entire report or just one page of the report. The email will be an image of the report only, if the report requires filters, you will still need to view the actual report in Power BI as the emailed snapshot is not interactive.

To receive an email subscription of the entire report, in the Dashboard view of the report, select the Subscribe envelope icon in the top right corner to open the Subscribe options.

Figure 25 – To receive an email subscription of a report in Microsoft Power BI, use the Subscribe feature
Figure 25 – To receive an email subscription of a report in Microsoft Power BI, use the Subscribe feature

In the Subscribe to Emails window, make sure the toggle switch is set to On (you can unsubscribe from reports by switching this toggle to Off). Fill in the subject for the email subscription so you will recognize it in your inbox, and if you like, you can include a message. Click Save and Close at the bottom. You will then receive an email of the report when the report is updated.

Figure 26 – Form for subscribing to emails in Microsoft Power BI
Figure 26 – Form for subscribing to emails in Microsoft Power BI

To receive an email subscription of only one page of a report, go to the Report view (click the report name in the top left corner of the Dashboard view to be taken to the Report view) of the report you want to subscribe to, select the tab of the page you want to subscribe to, and then select the Subscribe envelope icon in the top right corner to open the Subscribe options and fill in the Subscribe to Emails window.

Figure 27 – Use the Favorites feature in Microsoft Power BI for reports you want to see on a regular basis
Figure 27 – Use the Favorites feature in Microsoft Power BI for reports you want to see on a regular basis

NOTE: Once Favorited, the star icon next to the report will turn yellow.

To access your favorite reports, select Favorites on the left side menu, and you’ll see a list of the reports you have saved. If you save a report in Dashboard view as a favorite, you will see a gauge icon next to it. If you save a report in Report view as a favorite, you will see a bar chart icon next to it.

Figure 28 – Viewing a list of favorite reports using the Favorites feature in Microsoft Power BI
Figure 28 – Viewing a list of favorite reports using the Favorites feature in Microsoft Power BI

Taking Advantage of Additional Power BI Resources

Power BI is a versatile tool that provides great insights into your data. If you would like to learn more about how Power BI can help your business, please reach out to us, we have Power BI certified consultants that would be happy to help! If you are interested in learning more about the Power BI community, check out the Power BI User Group. To learn more about Power BI, visit Power BI blog posts or Microsoft’s Power BI guided learning page or contact ArcherPoint for assistance with your Power BI needs.

 

Blog Tags: 

Customizing Microsoft Dynamics Business Central on premises using Extensions

$
0
0

How to Use Extensions in Microsoft Dynamics 365 Business Central On Premises How to use Extensions in Microsoft Dynamics 365 Business Central On-Premises

Extensions make it easy and convenient to create customizations in Microsoft Dynamics Business Central without interfering with the way the base code operates or affecting future upgrades. This blog demonstrates how to use Extensions for adding fields to the Customer table, using the AL programming language.   

  1. Create a new file for table extension.
    Figure 1 – Creating a new file for a table extension in Dynamics Business Central on-premises
    Figure 1 – Creating a new file for a table extension in Dynamics Business Central on-premises
    You should define a standard file name format for files. For creating the table extension, use the shortcut: tt. By doing this, we have many options for selecting the ttableext.
    Figure 2 – Naming the file for the table extension in Dynamics Business Central on premises
    Figure 2 – Naming the file for the table extension in Dynamics Business Central on premises
    A model table for the table extension follows:
    Figure 3 – Model table for a table extension
    Figure 3 – Model table for a table extension
  2. Now that we have discussed the concepts used in the table extension, it’s time to add some fields using the snippet tf(tfield) as shown below.
    Figure 4 – Adding fields to a customer card
    Figure 4 – Adding fields to a customer card
    After adding four fields, the table extension is complete, as shown below.
    Figure 5 – Customer card with four new fields
    Figure 5 – Customer card with four new fields
  3. Create a new file for page extension (as shown below). For a table extension, use the snippet tpageext (similar to table extension).
    Figure 6 – Creating a new file for a page extension
    Figure 6 – Creating a new file for a page extension
    The following screenshot shows some additional tips about page extensions; choose the action where you want to add your Extensions.
    Figure 7 – Additional tips about page extensions in Business Central
    Figure 7 – Additional tips about page extensions in Business Central
  4. Then for creating the page field, you can use the snippet called tpagefield, as shown below.
    Figure 8 – Select the tpagefield snippet in Business Central
    Figure 8 – Select the tpagefield snippet in Business Central
    The following shows the page fields.
    Figure 9 – Business Central page fields
    Figure 9 – Business Central page fields
  5. After completing all these steps, open the Command Palette or →AL:Publish or use the F5 keyboard shortcut.
    Figure 10 – Open command palette in Business Central on-premises
    Figure 10 – Open command palette in Business Central on-premises

You can now see the fields see the new fields, added to the Customer table.

Figure 11 – New field shown on the Business Central customer card
Figure 11 – New field shown on the Business Central customer card

If you have any questions about Extensions for Dynamics NAV or Business Central or other questions about any version, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.

If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.


Customizing Microsoft Dynamics Business Central on premises using AL Code Functions

$
0
0

How to: Customize Microsoft Dynamics Business Central On Premises Using AL Code Functions 

How to Customize Microsoft Dynamics 365 Business Central On-Premises using AL Code Functions

If you’re new to Microsoft Dynamics Business Central on premises, you need to know how to easily customize it. In this blog, you’ll learn how to do customizations using AL code functions, including use of Message statements, how to insert a record, and how to modify a record, which makes it easy and fast. This example discusses how to display the information and insert and modify a record in the Customer table using AL Code.

Step 1: Message Statement

There are multiple predefined statements in AL Code. One such predefined statement is “Message.” This is used to display information.

Create a new file for the codeunit. Be sure to use a standard file name format for files. To create the codeunit, use the shortcut or Snippet (tc). You will be presented with many options; select tcodeunit.

Figure 1 – Creating a new file for a codeunit and by using snippet in Dynamics Business Central on premises
Figure 1 – Creating a new file for a codeunit and by using snippet in Dynamics Business Central on premises

A variable can be defined with a global or a local scope. If you define your variable with a global scope, it will be available everywhere in the object. So, on every trigger, everywhere you want to write code statements, that variable will be available.

When the scope is local, you can only access that variable in the specific trigger where it was declared. The example below uses global variables just for additional details. It uses three variables, but the mytext variable is enough for this message statement.

Figure 2 – Declaring variables and assigning those values to message statements / Functions in Dynamics Business Central on premises
Figure 2 – Declaring variables and assigning those values to message statements / Functions in Dynamics Business Central on premises

Create a new file for the page extension. Again, be sure to use a standard file name format for files. For creating the page extension, use the shortcut or Snippet (tpage). You are presented with several options; select tpageext.

Figure 3 – Creating a Page extension and by using snippet (As shown below) in Dynamics Business Central on premises
Figure 3 – Creating a Page extension and by using snippet (as shown below) in Dynamics Business Central on premises

This page extension tells where you want to extend the actions or features. In this screenshot, you see how to extend the features in the customer list, or you can use 22 instead of “customer list” because 22 is the page number of customer list.

Figure 4 – Creating a page extension (assigning the variable to codeunit and codeunit name) in Dynamics Business Central on premises
Figure 4 – Creating a page extension (assigning the variable to codeunit and codeunit name) in Dynamics Business Central on premises

Use F5 in keyboard or the shortcut Ctrl + G to select > AL: Publish. You will now see the output of the Message Statement.

Figure 5 –This is the output of message statement in Dynamics Business Central on premises
Figure 5 –This is the output of message statement in Dynamics Business Central on premises

Step 2: Insert a Record in Customer Table

Create a new file for inserting a record. For creating the codeunit, use the shortcut or Snippet (tc).

In this example, a record is inserted using the INSERT function. INIT refers it to set default values to the table. Some fields are added here, and the variables syntax shows that the values are taken from the record, with customer as the table name.

Figure 6 – Creating a new file for codeunit to insert a record in Dynamics Business Central on premises
Figure 6 – Creating a new file for codeunit to insert a record in Dynamics Business Central on premises

Create a page Extension for inserting a record in the customer table. Use the shortcut or Snippet (tpage).

Here, you again clearly state where you want to add this action as well as the action name. Again, you can use 22 instead of “customer list” because 22 is the page number of customer list. The variable syntax shows that it takes the values from codeunit, and demo2 is the name of the codeunit.

Figure 7 – Creating a Page extension for insert a record in Dynamics Business Central on premises
Figure 7 – Creating a Page extension for insert a record in Dynamics Business Central on premises

Use F5 the shortcut Ctrl + G and select > AL: Publish. The customer page will open; go to Navigate → Customer → comments → InsertDemo(Action name).

Figure 8 – The action is added after comments, and name of the action is insert demo in Dynamics Business Central on premises
Figure 8 – The action is added after comments, and name of the action is insert demo in Dynamics Business Central on premises

A new record is added in the customer table, and the output is “Benjamin Franklin.”

Figure 9 – New record inserted in the customer table in Dynamics Business Central on premises
Figure 9 – New record inserted in the customer table in Dynamics Business Central on premises

Step 3: Modify a Record in the Customer Table

Create a new file to modify a record in the customer table. For creating the codeunit, use the shortcut or Snippet (tc). There are several options for selecting the tcodeunit.

Next, modify the record using the MODIFY function. Select the field you want to modify and write the new value in that field. The variable’s syntax shows the values are taken from the record, and customer is the table name.

Figure 10 – Creating a new file for a codeunit and modifying the customer name in Dynamics Business Central on premises
Figure 10 – Creating a new file for a codeunit and modifying the customer name in Dynamics Business Central on premises

Create a page Extension for modifying a record in the customer table. Use the shortcut or Snippet (tpage). There are several options for selecting the tpageext.

Here, you clearly state where you want to add this action and the action name. You can use 22 instead of “customer list” because 22 is the page number of customer list.  The variable syntax shows it takes the values from the codeunit, and demo3 is the name of the codeunit.

Figure 11 – Creating a Page extension for modifying a record in Dynamics Business Central on premises
Figure 11 – Creating a Page extension for modifying a record in Dynamics Business Central on premises

Use F5 Ctrl + G and select > AL: Publish. The customer page will open; go to Navigate → Customer → addafter → comments → ModifyAction(Action name).

Figure 12– The action is added after comments, and name of the action is modify Action in Dynamics Business Central on premises
Figure 12– The action is added after comments, and name of the action is modify Action in Dynamics Business Central on premises

The record is now modified; the output is now “Franklin.”

Figure 13 – Modified record in the customer table in Dynamics Business Central on premises
Figure 13 – Modified record in the customer table in Dynamics Business Central on premises

If you have any questions about Extensions or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

Read more "How To" blogs from Archer Point for practical advice on using Microsoft Dynamics Business Central or NAV. If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.

Blog Tags: 

Creating a Report in Microsoft Dynamics 365 Business Central or NAV

$
0
0

How To Create a Report in Microsoft Dynamics 365 Business Central or Dynamics NAV

How to create a report in Microsoft Dynamics 365 Business Central and Dynamics NAVThis blog provides an overview of how a report is created in Microsoft Dynamics 365/NAV and how to publish it to the client. It also discusses how to build a report in the SQL Server Report Builder.

  1. Developers will know that you need to configure the app.json and launch.json. Set up all the basic settings that are required in launch.json.
    Figure 1 – Basic settings in launch.json in Microsoft Dynamics 365 Business Central/NAV
    Figure 1 – Basic settings in launch.json in Microsoft Dynamics 365 Business Central/NAV

Note: You always need to verify some basic configurations like name and the ServerInstance and the startupObjectId.

  1. Once the configuration is completed and the symbols are downloaded, remove the “HelloWorld.al” file and then create the Report file, as shown in the example in Figure 2.
    Figure 2 – Creating a report file in Microsoft Dynamics 365 Business Central/NAV
    Figure 2 – Creating a report file in Microsoft Dynamics 365 Business Central/NAV
  2. Once the report coding is done, either go to the “View>>Command Pallet” or use the shortcut Ctrl+Shift+P.
    Figure 3 – View>>Command Pallet in Microsoft Dynamics 365 Business Central/NAV
    Figure 3 – View⇒Command Pallet in Microsoft Dynamics 365 Business Central/NAV
  3. Once the report is created, publish it. You will see all the changes, as in Figure 4.
    Figure 4 – Report with changes in Microsoft Dynamics 365 Business Central/NAV
    Figure 4 – Report with changes in Microsoft Dynamics 365 Business Central/NAV
  4. Once you publish the report programming file, you see a new file created. If you open that new file, you would see that it would be difficult to read the entire file.
  5. Reveal the file in the explorer by right-clicking over myreportcustomer.rdl and then selecting “Reveal” in explorer.
    Figure 5 – A new file created in Microsoft Dynamics 365 Business Central/NAV
    Figure 5 – A new file created in Microsoft Dynamics 365 Business Central/NAV
    Figure 6 – File revealed in the explorer in Microsoft Dynamics 365 Business Central/NAV
    Figure 6 – File revealed in the explorer in Microsoft Dynamics 365 Business Central/NAV

Once you open the file, you are in the new window of the Microsoft SQL Server Report Builder.  The next step goes into table designing and layout of the table. This is also where a personalization can be made for a customer.

Following are the components of the Report Builder that are involved in report design:

Figure 7 – The center of the Report Builder screen in Microsoft Dynamics 365 Business Central/NAV: table design and possible outcomes that can be applied to a report
Figure 7 – The center of the Report Builder screen in Microsoft Dynamics 365 Business Central/NAV: table design and possible outcomes that can be applied to a report

Figure 8 – The table wizard in the Report Builder in Microsoft Dynamics 365 Business Central/NAV
Figure 8 – The table wizard in the Report Builder in Microsoft Dynamics 365 Business Central/NAV

Figure 9 – Window in which members of the report are arranged in the Report Builder in Dynamics 365 Business Central/NAV
Figure 9 – Window in which members of the report are arranged in the Report Builder in Dynamics 365 Business Central/NAV

  1. Select the members and drag them to the “∑ Values”.
    Figure 10 – Selecting members of a report in the Report Builder in Dynamics 365 Business Central/NAV
    Figure 10 – Selecting members of a report in the Report Builder in Dynamics 365 Business Central/NAV
  2. You will see a preview similar to Figure 11 that will display how the table will be prepared as per the order of the fields selected.
    Figure 11 – Preview of table display in the Report Builder in Dynamics 365 Business Central/NAV
    Figure 11 – Preview of table display in the Report Builder in Dynamics 365 Business Central/NAV
  3. Click Finish and head to the designer part of the table.
    Figure 12 – Designer in the Report Builder in Dynamics 365 Business Central/NAV
    Figure 12 – Designer in the Report Builder in Dynamics 365 Business Central/NAV
  4. The figure below helps you understand how the report is built with the help of a wizard.
    Figure 13 – Designing a report with the help of a wizard in the Report Builder in Dynamics 365 Business Central/NAV
    Figure 13 – Designing a report with the help of a wizard in the Report Builder in Dynamics 365 Business Central/NAV

Note: In this example, basic changes are demonstrated with personalization as per standard requirements of a customer.

  1. Once the customizatom is completed, save the report and open visual studio. Create the page extensions so that they will be visible on the web client. You can also add a button wherever you want to place it.
    Figure 14 – Using visual studio to create page extensions that will be visible in the web client in the Report Builder in Dynamics 365 Business Central/NAV
    Figure 14 – Using visual studio to create page extensions that will be visible in the web client in the Report Builder in Dynamics 365 Business Central/NAV
  2. Once the page extension is created, publish it.
  3. Once it is published, go the web client and check to see if the report is working properly.
    Figure 15 – Report created in the Report Builder in Dynamics 365 Business Central/NAV
    Figure 15 – Report created in the Report Builder in Dynamics 365 Business Central/NAV

You can see the button placed earlier and can add more as needed.
Figure 16 – Adding a button in the Report Builder in Dynamics 365 Business Central/NAV
Figure 16 – Adding a button in the Report Builder in Dynamics 365 Business Central/NAV

  1. From here, you can preview the report, print it, schedule a time for it to be printed later, or send it to email.
    Figure 17 – Options for what to do with a report after creating it in the Report Builder in Dynamics 365 Business Central/NAV
    Figure 17 – Options for what to do with a report after creating it in the Report Builder in Dynamics 365 Business Central/NAV

If you have any questions about report building or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV. If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.

 

Installing the AL Language Extension in Visual Studio Code

$
0
0

Installing the AL Language Extension in Visual Studio Code How to Install the AL Language Extension in Visual Studio Code

Follow these instructions to install an AL extension in Visual Studio Code.

1.     Open Visual Studio

Figure 1 – Open Visual Studio
Figure 1 – Open Visual Studio

2.     Navigate to View-> Extensions

Figure 2 – Navigate to Extensions through the View menu bar
Figure 2 – Navigate to Extensions through the View menu bar

3.     Type AL in the search bar and install AL Language

Figure 3 – Search for the AL Language Extension
Figure 3– Search for the AL Language Extension

Figure 4 – Install the AL Language Extension
Figure 4– Install the AL Language Extension

4.     After Installing, Click Reload to complete the AL Extension Installation

Image 5 – Reload the AL Language Extension
Image 5– Reload the AL Language Extension

Figure 6 – Installed AL Language Extension in the Explorer pane
Figure 6 – Installed AL Language Extension in the Explorer pane

You now have the AL language extension installed in Visual Studio Code.

If you have any questions about this function or other Microsoft Dynamics 365 Business Central or Dynamics NAV questions for any version, contact Archerpoint.

Read more "How To" blogs from Archerpoint for practical advice on using Microsoft Dynamics NAV.

If you are interested in NAV development, check out our collection of NAV Development Blogs.

Using Codeunits in Microsoft Dynamics 365 Business Central

$
0
0

Codeunits in Microsoft Dynamics 365 Business Central 

Codeunits in Microsoft Dynamics 365 Business Central: What they are and how to create them

In Microsoft Dynamics 365 Business Central, there are a lot of codeunits already available. Every codeunit is a collection of different functions. If they are global functions, they can be called from within your own code. There are codeunits that help you work with XML data, help you with importing and exporting data, setting up number series, and so on. We will talk about some codeunit fundamentals, see how we can create functions and variables in a codeunit, and how we can run a codeunit from a page.

A codeunit is a core object of the Microsoft Dynamics 365 Business Central application, together with Tables and Pages.

A CodeUnit contains:

  • Triggers
  • Functions
  • Variables
  • Properties
  • Statements

A codeunit groups different procedures in one object. These procedures can be accessed from within other procedures and triggers on pages, tables, and other codeunits.

Creating a Codeunit

Create a new file, call it in a standard format, and then we can use the code snippet which is T, codeunit type, which will create a codeunit. Provide the Number and name of the codeunit.

Figure 1 - Creating a new file for a codeunit in Microsoft Dynamics 365 Business Central on premises
Figure 1 - Creating a new file for a codeunit in Microsoft Dynamics 365 Business Central on premises

When we create a new codeunit, the always on run trigger will be created. To create some new procedures, just type procedure, the name of your procedure, then there will be a begin and an end. And in between the begin and the end, you can start writing your code. To create your variables, you can go to the end of your codeunit, and here we will find the global variables. So it is a global variable available for all procedures in the codeunit. If you would like to create a local variable, you go into the procedure, type var, and then you can create your variable of type.

Figure 2 - Creating local and global variables, and a procedure for a codeunit in Dynamics Business Central on premises
Figure 2 - Creating local and global variables, and a procedure for a codeunit in Dynamics Business Central on premises

If you would like to create a function, you go into the procedure and type the necessary code for the function. As an example, below I am using the addition function, so am passing two inputs; number1 integer and number2 integer. We have declared two integer values, so when I call function add it will pass those values. When the function is executed the Message gets executed and displays the result.

Figure 3 – Function for add in Dynamics Business Central on premises
Figure 3 – Function for add in Dynamics Business Central on premises

We need to run this codeunit so we can make a page extension by using the page extension snippet. Specify where you want to place it. In the action, we will see that there's a trigger with the name on action. So, when you click an action or when you click a button, it will trigger the on action trigger. Now, in the trigger we can create a variable like we did with the codeunit. Using that variable, we can call the codeunit. After finishing these steps lets publish it by hitting F5 or the shortcut Ctrl + G to select > AL: Publish.

Figure 4 –PageExtension for the codeunit in Dynamics Business Central on premises
Figure 4 –PageExtension for the codeunit in Dynamics Business Central on premises

If you have any questions about codeunits, page extensions, or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.

Read more "How To" blogs from Archer Point for practical advice on using Microsoft Dynamics Business Central or NAV. If you are interested in Dynamics NAV/Business Central development, check out our collection of NAV Development Blogs.

Blog Tags: 

Using the Date Function in Microsoft Dynamics 365 Business Central On Premises

$
0
0

How to Use Date Functions in Microsoft Dynamics Business Central On Premises How to Used Date Functions in Microsoft Dynamics 365 Business Central On Premises

There are various places throughout Microsoft Dynamics 365 Business Central where you can enter dates in fields. In fact, a good deal of data in the application is linked to dates. For example, in a sales order, you can set the shipment date. When filtering lists or report data, you can enter dates and times to pinpoint only the data you want to see. If you look at a sales order, an invoice. or a credit memo, there are document dates, posting dates, and date of entry. On the customer record, there is the date of birth. This blog explains how to use the Date function for specific uses.

When processing these dates in the code, you can use certain Date functions to get specific information out of a date, or to change a date in a specific format:

  • DATE2DMY
  • DATE2DWY
  • CALCDATE
  • Today
  • Date

There is also the Time function, which gets the current time, and the Workdate function, which gets the work date that is set in the application.

DATE2DMY

With DATE2DMY used to get specific parts out of a certain date. DATE2DMY stands for “Date To Day, Month, Year”.

Syntax: Number: = DATE2DMY(date, position);

Date: The inputting date.

Position: Specifies what the function returns. The valid options are 1, 2, and 3.

The value 1 corresponds to day of the week (1-7, Monday = 1).

The value 2 corresponds to week number (1-53).

The value 3 corresponds to year.

To use this function, create a new file for the codeunit. Be sure to use a standard file name format for files. To create the codeunit, use the shortcut or Snippet (tc). You will be presented with many options; select tcodeunit and provide the unique codeunit ID and name.

Figure 1 – Creating a new file for a codeunit and by using snippet in Dynamics Business Central on premises
Figure 1 – Creating a new file for a codeunit and by using snippet in Dynamics Business Central on premises

To get the specific part of a date, use DATE2DMY, and to display the output, use a message and a variable to store the output. A variable can be defined with a global or a local scope. If you define your variable with a global scope, it will be available everywhere in the object. So, on every trigger, everywhere you want to write code statements, that variable will be available. When the scope is local, you can only access that variable in the specific trigger where it declared. Here, you can use the mydate variable, which is global and can be accessed everywhere.

Figure 2 – Declaring variables and assigning those values to message statements / using date Functions in Dynamics Business Central on premises
Figure 2 – Declaring variables and assigning those values to message statements / using date Functions in Dynamics Business Central on premises

This example uses the Today function to get the current date. The integer represents which specific part of the date is presented. If it is one, it shows the date; if 2, it is the month. The function’s output is assigned to the variable Mydate for the display. Then the value is displayed using a message.

Create a new file for the page extension. Be sure to use a standard file name format for files. For creating the page extension, use the shortcut or Snippet (tpage). You are presented with several options; select tpageext.

Figure 3 – Creating a Page extension by using snippet (As shown below) in Dynamics Business Central on premises
Figure 3 – Creating a Page extension by using snippet (As shown below) in Dynamics Business Central on premises

The Page Extension tells you where you want to extend action. In this example, we are extending to a salesperson list.

Figure 4 – Creating a page extension (assigning the variable to codeunit and codeunit name) in Dynamics Business Central on premises
Figure 4 – Creating a page extension (assigning the variable to codeunit and codeunit name) in Dynamics Business Central on premises

You can publish it using F5 in keyboard or the shortcut Ctrl + G to select > AL: Publish.

Figure 5 –Navigating through the option in Action to choose Mydateunit in Dynamics Business Central on premises
Figure 5 –Navigating through the option in Action to choose Mydateunit in Dynamics Business Central on premises

Figure 6 –Message to display the specified part of date in Dynamics Business Central on premises
Figure 6 –Message to display the specified part of date in Dynamics Business Central on premises

DATE2DWY

With DATE2DWY, you can get specific parts out of a certain date. DATE2DWY stands for “Date To Day, Week, Year”.

Syntax: Number: = DATE2DWY(date, position);

Date : The inputting date.

Position : Specifies what the function returns. The valid options are 1, 2, and 3.

The value 1 corresponds to day of the week (1-7, Monday = 1).

The value 2 corresponds to week number (1-53).

The value 3 corresponds to year.

Create a new file for the codeunit or use the previously created one for the dateunit. Be sure to use a standard file name format for files. To create the codeunit, use the shortcut or Snippet (tc). You will be presented with many options; select tcodeunit and provide the unique codeunit ID and name.

Figure 7 – Creating a new file for a codeunit and by using snippet in Dynamics Business Central on premises
Figure 7 – Creating a new file for a codeunit and by using snippet in Dynamics Business Central on premises

To get the specific part of a date, use DATE2DWY, and for displaying the output, use a message and a variable to store the output. A variable can be defined with a global or a local scope. If you define your variable with a global scope, it will be available everywhere in the object. So, on every trigger, everywhere you want to write code statements, that variable will be available. When the scope is local, you can only access that variable in the specific trigger where it was declared. Here, you can use mydate variable, which is global and can be accessed everywhere.

Figure 8 –Result of DATE2DWY is assigning to a variable in Dynamics Business Central on premises
Figure 8 –Result of DATE2DWY is assigning to a variable in Dynamics Business Central on premises

In Date2DWY, the position returns 3 options:

(1) the date corresponding to day of the week (1-7, Monday=1)

(2) week number (1-53)

(3) year

Figure 9 –Different returns in DATE2DWY in Dynamics Business Central on premises
Figure 9 –Different returns in DATE2DWY in Dynamics Business Central on premises

Next, create a pageextension if you are creating a new codeunit. You can use the snippet(tpage) or shortcut. You are presented with several options; select tpageext.  If you use the existing codeunit, then create the corresponding action of the new one.

Figure 10 –Creating page extension using snippet in Dynamics Business Central on premises
Figure 10 –Creating page extension using snippet in Dynamics Business Central on premises

Page Extension tells you where you want to extend action. Here we are extending to a salesperson list.

Figure 11 – Creating a page extension (assigning the variable to codeunit and codeunit name) in Dynamics Business Central on premises
Figure 11 – Creating a page extension (assigning the variable to codeunit and codeunit name) in Dynamics Business Central on premises

You can publish it using F5 on the keyboard or the shortcut Ctrl + G to select > AL: Publish.

Figure 12 –Navigating through the option in Action to choose Mydateunit in Dynamics Business Central on premises
Figure 12 –Navigating through the option in Action to choose Mydateunit in Dynamics Business Central on premises

Figure 13 –Messages that display the output in Dynamics Business Central on premises
Figure 13 –Messages that display the output in Dynamics Business Central on premises

CALCDATE

CALCDATE calculates a new date that is based on a date expression and a reference date.

Syntax:

NewDate :=   System.CalcDate(DateExpression: DateFormula, [Date: Date])

DateExpression

Type dateformula

D | WD | W | M | Q | Y (D=day, WD=weekday, W=week, M=month, Q=quarter, Y=year)

Examples of terms:

  • 30D (corresponds to30 days;)
  • WD2 (corresponds to weekday number 2)
  • CW (corresponds to current week;)

Date
 Type: Date
Use this optional parameter to define a reference date. The default is the current system date. If you omit this optional value, the current system date is used.

Create a new file for the codeunit or use the previously created one for the dateunit. Be sure to use a standard file name format for files. To create the codeunit, use the shortcut or Snippet (tc). You will be presented with many options; select tcodeunit and provide the unique codeunit id and name.

Figure 14 – Creating a new file for a codeunit and by using snippet in Dynamics Business Central on premises
Figure 14 – Creating a new file for a codeunit and by using snippet in Dynamics Business Central on premises

With the CALCDATE function, you can calculate new dates, starting from a certain date. Here we have 3 variables Expr3,Rdate and Mydate. Expr3 specifies how many days are added to current Month. RDate refers a date. Mydate variable is used to assign the calculated date.

Figure 15 –Globally declared variables and specifies the id and name of codeunit in Dynamics Business Central on premises
Figure 15 –Globally declared variables and specifies the id and name of codeunit in Dynamics Business Central on premises

Figure 16 – calc function in Dynamics Business Central on premises
Figure 16 – calc function in Dynamics Business Central on premises

You can now display the calcdate function using the message function.

Figure 17 –Navigating through the option in Dynamics Business Central on premises
Figure 17 –Navigating through the option in Dynamics Business Central on premises

Figure 18 – calculated date display using Message function in Dynamics Business Central on premises
Figure 18 – calculated date display using Message function in Dynamics Business Central on premises

TODAY and DATE

The TODAY is another date function that is used to get the current date from the operating system. The TIME function works on the same way; it provides the current time from the operating system.

You can create a new codeunit or can do the coding in the previously created codeunit. If you are creating a new codeunit, use the shortcut or Snippet (tc). You will be presented with many options; select tcodeunit and provide the unique codeunit id and name.

Declare the variable to hold values from function which is using in the display purpose.

Figure 19 –Time and Today Function in Dynamics Business Central on
Figure 19 –Time and Today Function in Dynamics Business Central on premises

The result is presented with the help of a message function.

Figure 20 – Message to display Time and Today Function in Dynamics Business Central on premises
Figure 20 – Message to display Time and Today Function in Dynamics Business Central on premises

If you have any questions about Microsoft Dynamics NAV or Business Central functionality, contact ArcherPoint.

Read more "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV. If you are interested in NAV/Business Central development, check out our collection of NAV Development Blogs.

Viewing all 279 articles
Browse latest View live