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

Microsoft Dynamics Business Central or NAV: Creating a Customer Requirement

$
0
0

How To: Create a Customer Requirement in Microsoft Dynamics Business Central or NAV 

This blog explains how to create a simple Customer Requirement in Microsoft Dynamics Business Central or NAV. Requirements are:

Creating a Customer Requirement using AL code for Dynamics Business Central or NAV

  • Add a new Table and Page Designation containing three fields: Code, Description and Disabled
  • Add a new Field in the Resource table, Designation Code
  • The user should be able to select the Designation Code in the Resource Card from the new Table
  • When the user selects Resource in Sales Order Lines, the Designation Code selected in the Resource Card should be available in the Sales Order Lines Page
  • If the user increases the Quantity in the Sales order line to more than 20, the Designation code should set to Blank
  • The user should also be able to select the Designation Code in the Sales Order Lines Page.

A table is a collection of related data held in a structured format of columns and rows within a database. In Business Central/NAV you have a table where you store your customer information, a table for vendor data, a table for item data, and so on. So, with tables, you organize and structure the data of your solution.

  1. Add a new Table and Page Designation containing three fields: Code, Description, and Disabled.
    Figure 1 - Creating and adding fields in Designation Table in Microsoft Dynamics Business Central/NAV
    Figure 1 - Creating and adding fields in Designation Table in Microsoft Dynamics Business Central/NAV
    Pages allow the user to interact with Business Central/NAV. Pages can be displayed on multiple display targets, like computers, tablets, and smart phones. A Page can be linked to a source table or not. If they are not linked to a source table, they are either Role Center pages or blank pages.
    Figure 2 - Creating and adding fields in designation page in Dynamics Business Central/NAV
    Figure 2 - Creating and adding fields in designation page in Dynamics Business Central/NAV
  2. Add a New Field in the Resource Table, Designation Code.
    The Table Extension object is used to extend existing tables in the Business Central application. You can add new fields but not delete or change existing fields. There are certain table properties that cannot be modified with a Table Extension (for example, the ID and Name of the table). You can create new secondary key but cannot modify the primary key.
    Figure 3 – Adding new field in the Resource table in Microsoft Dynamics Business Central/NAV
    Figure 3 – Adding new field in the Resource table in Microsoft Dynamics Business Central/NAV
  3. The Page Extension object is used to extend existing pages in the Business Central/NAV application. You can add, move, or hide existing fields.
    Figure 4 - Adding fields in the Resource Card in Microsoft Dynamics Business Central/NAV
    Figure 4 - Adding fields in the Resource Card in Microsoft Dynamics Business Central/NAV
  4. The user should be able to select a Designation Code in the Resource Card from the new Table.
    Figure 5 - Creating a Table Relation in Microsoft Dynamics Business Central/NAV
    Figure 5 - Creating a Table Relation in Microsoft Dynamics Business Central/NAV  
  5. When the user selects Resource in Sales Order Lines, the Designation Code selected in Resource Card should be available in Sales Order Lines Page. For this requirement, you need to create a table extension for adding the Designation Code Field in the Sales Line Table.
    Figure 6 - Adding a field in the Sales Line Table in Microsoft Dynamics Business Central/NAV
    Figure 6 - Adding a field in the Sales Line Table in Microsoft Dynamics Business Central/NAV
  6. Create a Page Extension for adding a Designation Code field in the Sales Line Table.
    Figure 7 - Adding a Field in the Sales Order sub form in Dynamics 365 Business Central on premises
    Figure 7 - Adding a Field in the Sales Order sub form in Dynamics 365 Business Central on premises
    A Code Unit is a container for AL code that you can use in many application objects. Typing the shortcut “tcodeunit” will create the basic layout for a Code Unit object when using the AL Language extension in Visual Studio Code.
    Figure 8 - Creating a Code Unit for the Sales Line Table in Microsoft Dynamics Business Central/NAV
    Figure 8 - Creating a Code Unit for the Sales Line Table in Microsoft Dynamics Business Central/NAV
  7. If the user increases the Quantity in a Sales Order line to more than 20, the Designation Code should set to Blank.
    Figure 9 – Creating one more event subscriber In the same Codeunit in Microsoft Dynamics Business Central/NAV
    Figure 9 – Creating one more event subscriber In the same Codeunit in Microsoft Dynamics Business Central/NAV
  8. The user should also be able to select the Designation Code in the Sales Order Lines Page. This requirement is satisfied in Figure 10.
    Figure 10 - Creating a table relation for the Sales Line and Designation Table in Microsoft Dynamics Business Central/NAV
    Figure 10 - Creating a table relation for the Sales Line and Designation Table in Microsoft Dynamics Business Central/NAV

If you have any questions about Dynamics NAV or Business Central 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 Development Blogs.

     

    Blog Tags: 

    Using the Event Recorder for Developing Extensions in Microsoft Dynamics Business Central

    $
    0
    0

    How To: Use the Event Recorder to Develop Extensions in Microsoft Dynamics Business Central Using the Event Recorder to Develop Extensions in Dynamics Business Central

    When developing an extension for Dynamics 365 Business Central (BC), one of the hardest problems is detecting which event to subscribe. To detect the event, there are two options: Go To Definition in AL code, and the Event Recorder feature. This blog discusses how to use the Event Recorder feature.

    The Event Recorder is a feature that allows all the events to be listed when a certain action is performed in BC.

    1. Open the Event Recorder. You will see the Record Event menu with Start and Stop buttons. The Start button starts the recording process and records all the events in the exact order as they are called, while the Stop button stops the recording process.
      Figure 1 - Searching the Event Recorder in Microsoft Dynamics Business Central
      Figure 1 - Searching the Event Recorder in Microsoft Dynamics Business Central
      Figure 2 - Event Menu with the Start and Stop buttons in Microsoft Dynamics Business Central
      Figure 2 - Event Menu with the Start and Stop buttons in Microsoft Dynamics Business Central
    2. To start the recording, click Yes.
    3. Open a new window in the browser. This is where you will perform the process.  
    4. When the event has been recorded, navigate to Event Recorder window. You will see a window similar to that in Figure 3.
    5. Click Stop.
      Figure 3 - Stopping the event recording in Microsoft Dynamics Business Central
      Figure 3 - Stopping the event recording in Microsoft Dynamics Business Central
      Now you can see how many events occurred from when you started until you stopped recording, as shown in Figure 4.
      Figure 4 - Popup message displaying number of events recorded in Microsoft Dynamics Business Central
      Figure 4 - Popup message displaying number of events recorded in Microsoft Dynamics Business Central
    6. If you want to see those events, click Yes; otherwise, click No. If you click Yes, you will see a window similar to that in Figure 5, which shows all the events in the exact order they were recorded.
      Figure 5 - Events listed in Microsoft Dynamics Business Central
      Figure 5 - Events listed in Microsoft Dynamics Business Central
    7. If you want to look at the AL code or need to get the event prepared for it, click on the AL Snippet and get the code, as shown in Figure 6. You’ll see a message like that in Figure 7.
      Figure 6 – Clicking on the AL Snippet to get the code for an event in Microsoft Dynamics Business Central
      Figure 6 – Clicking on the AL Snippet to get the code for an event in Microsoft Dynamics Business Central
      Figure 7 – Example of AL code snippet for a selected event in Microsoft Dynamics Business Central
      Figure 7 – Example of AL code snippet for a selected event in Microsoft Dynamics Business Central

    If you have any questions about the Event Recorder 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/BC Development Blogs.

    Blog Tags: 

    Creating a new job in Microsoft Dynamics Business Central

    $
    0
    0

    How To: Create a Job in Microsoft Dynamics Business Central 

    How to create a job in Microsoft Dynamics 365 Business Central or Dynamics NAV

    This blog describes two ways to create a new job that includes budgets in Microsoft Dynamics Business Central. By including budgets, you increase visibility into cost, which helps you predict cost overruns and maximize revenue.

    From the Project Manager Role Center, use the navigation list to see the list of jobs.

    1. Set Up the Role Center Page as a Project Manager Role Center. Click on My Settings in the upper right corner.
    2. Change the Role Center to “Project Manager” from drop down and click OK.
    3. From the Project Manager Role Center, click on Jobs, and you will see the list of jobs.
      Figure 1 – List of jobs in the Role Center in Microsoft Dynamics Business Central
      Figure 1 – List of jobs in the Role Center in Microsoft Dynamics Business Central
    4. Create a new job. Click New, and a blank Job Card Page will open in Business Central. Business Central will assign the Job No.
      Figure 2 – New job opened in Microsoft Dynamics Business Central
      Figure 2 – New job opened in Microsoft Dynamics Business Central
    5. Enter all the basic information like Description and Bill to Customer No., and assign yourself as a Project Manager, so that the Role Center will display the new job.
    6. Assign the Task. Typically, the JOB TASK NO is part of the No. sequence you defined. Keep it simple, for example 100, 200. Define as many tasks as needed.
      Figure 3 – JOB TASK NO. assigned by Microsoft Dynamics Business Central
      Figure 3 – JOB TASK NO. assigned by Microsoft Dynamics Business Central
    7. Set the JOB TASK TYPE as Posting so you can add the budget information on the Planning Line.
      Figure 4 – Setting the JOB TASK TYPE to Posting in Microsoft Dynamics Business Central
      Figure 4 – Setting the JOB TASK TYPE to Posting in Microsoft Dynamics Business Central
    8. To add budget information, open the Job Planning Line window.
      Figure 5 – Job Planning Line window in Microsoft Dynamics Business Central
      Figure 5 – Job Planning Line window in Microsoft Dynamics Business Central
    9. Enter the Job Task No., assigned previously.
    10. Fill in the Line Type, which can be Budget, Billable or Both Budget and Billable depending on the Line Cost or how it is done with that customer.
    11. Set the Planning date or the Document No.
    12. Set the Type “Resource”, “No.” and the Quantity.
      The cost and the price amounts come from the Resource or the Item resides.
    13. Go back to the Job Card. The task will show the totals for the Cost and the Invoicing in the Job details pane, which will help you stay within your budget.
    14. Move to the Posting fast tab, which is also very important when creating a new job.
    15. Choose the Job Posting Group, WIP Method. You can assign the Job posting group per Job, or in the Job setup window, you can specify the Job Posting group that Business Central will assign to the new Job.
      Figure 6 – Job Card with Job Posting Group and WIP Method set in Microsoft Dynamics Business Central
      Figure 6 – Job Card with Job Posting Group and WIP Method set in Microsoft Dynamics Business Central
      The Job list in the Project Manager Role Center will now display the Job you have created.
      Figure 7 – Job list in the Project Manager Role Center with new job displayed in Microsoft Dynamics Business Central
      Figure 7 – Job list in the Project Manager Role Center with new job displayed in Microsoft Dynamics Business Central
      To set up more jobs, you can save time by copying the tasks from an existing job.
    16. In the Project Manager Role Center, select New Job.
    17. Create New Job in Business Central through the Assistance setup guide. In the Create New Job window, select “Yes” and click Next.
    18. Since you will be copying an existing job, click Next to select the tasks you will copy.
      Figure 8 – Create New Job window in Microsoft Dynamics Business Central
      Figure 8 – Create New Job window in Microsoft Dynamics Business Central
    19. Select the Description and Bill–to–Customer No. you want to copy and click Next.
      Figure 9 – Selecting a Description and Bill-to-Customer No. to copy in Microsoft Dynamics Business Central
      Figure 9 – Selecting a Description and Bill-to-Customer No. to copy in Microsoft Dynamics Business Central
    20. Select the Job to copy from and specify task to allow it to copy all tasks. NOTE: On the Apply Fast tab, you can copy the quantity and the dimensions. Click OK, then OK again on the “The job was successfully copied” window. Then click “Finish.”
      You will now see the new job.
      Figure 10 – New job created in Microsoft Dynamics Business Central by copying an existing job
      Figure 10 – New job created in Microsoft Dynamics Business Central by copying an existing job

    If you have any questions about creating jobs or other Dynamics NAV or Business Central functionality 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 and Business Central Development Blogs.

    Blog Tags: 

    Using the AL Keyword in Microsoft Dynamics Business Central On Premises

    $
    0
    0

    How To: Use the MAXSTRLEN Keywords in Microsoft Dynamics Business Central On Premises How to customize Dynamics Business Central or NAV using the MAXSTRLEN AL Keyword

    If you’re new to Microsoft Dynamics Business Central on premises, you need to know how to easily customize it. This blog provides step-by-step instructions on how to use AL Keywords in a code unit in Microsoft Dynamics 365 Business Central. In this blog, you’ll learn how to do customizations using MAXSTRLEN keywords.

    1. Open Visual Studio.
    2. Create a Code unit for the MAXSTRLEN Keyword.

      MAXSTRLEN Keyword is used to get the maximum defined length of a string variable.

      Syntax:     Max: = MAXSTRLEN(String)

      Figure 1 – Creating a code unit for the MAXSTRLEN Keyword in Dynamics Business Central
      Figure 1 – Creating a code unit for the MAXSTRLEN Keyword in Dynamics Business Central
    3. Create a page extension.
      Figure 2 – Creating a page extension for the MAXSTRLEN Keyword in Dynamics Business Central
      Figure 2 – Creating a page extension for the MAXSTRLEN Keyword in Dynamics Business Central
    4. Click F5 or click on View, then Click on >AL: Publish. The vendor page will open; go to Navigate -> vendor-> MaxstrlenAction(Action name).
      Figure 3 – An action is added after Bank Accounts and the name of the action is MaxstrlenAction in Dynamics Business Central
      Figure 3 – An action is added after Bank Accounts and the name of the action is MaxstrlenAction in Dynamics Business Central 
    5. Final Output:
      Figure 4 – Output of the MAXSTRLEN Keyword in Dynamics Business Central
      Figure 4 – Output of the MAXSTRLEN Keyword in Dynamics Business Central

    For a more general discussion of using AL keywords for Microsoft Dynamics 365 Business Central customization, see the post How to: Customize Microsoft Dynamics Business Central On Premises Using AL Keywords.

    If you have any questions about this 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/BC Development Blogs.

    Blog Tags: 

    How to Create Custom Replicating Rows in Jet Reports

    $
    0
    0

    How To: Create Custom Replicating Rows in Jet Reports

    How To: Create Custom Replicating Rows in Jet Reports

    This blog provides step-by step instructions on how to create replicating rows in Jet Reports using the NL Rows function without referencing a table in your database or cube.

    When working with Jet Global’s Jet Reports, sometimes you need to create replicating rows using the NL Rows function using custom data or combinations instead of referencing your cube or database. It could be that the data you need to build the rows off of in your database isn’t combined or displayed the way you need it to be or it is not easy to filter to the desired values.

    In this example, we want to create rows using combinations of departments, but in our cube these departments are each separate, so we will need a way to have rows with our custom combinations.

    In this illustration, the cube contains our separate departments as:

    • Retail
    • Distribution
    • Warehouse
    • Finance
    • Leadership
    • Customer Service
    • Support

    In our report, we want to create rows based on the departments but have some of them combined like so:

    • Retail & Distribution
    • Warehouse
    • Finance & Leadership
    • Customer Service & Support

    Since the NL Rows function only creates rows based on the individual values from the database, we need a workaround to create rows with these combinations. To do this, we will create a table on a hidden sheet in our Jet report and then reference this table with the NL Rows function on our main sheet.

    1. In your Jet Report Excel worksheet, add a sheet for a hidden sheet, or if you already have an Options sheet, you can use that. Make sure that you use auto+hide+value+hidesheet in cell A1 so the sheet will remain hidden.
    2. Create a list of the items you want to use to create your rows. In our example, this will be our combined departments. You can make this a basic list (Figure 1), or if you anticipate adding items to the list later, you can make this list a table in Excel.
      Figure 1 – Creating a list with auto+hide+values+hidesheet in A1
      Figure 1 – Creating a list with auto+hide+values+hidesheet in A1
    3. To make your list a table (optional, not required), highlight the list, click the Data tab at the top of your Excel workbook, and select From Table/Range (Figure 2). Click OK, then click Close & Load (Figure 3). If a new and separate sheet is created in your workbook when you create the table, you can delete the tab and keep the table created on your original hidden sheet.
      Figure 2 – Optionally create a table with your list
      Figure 2 – Optionally create a table with your list
      Figure 3 – Click Close & Load on the Power Query Editor to create your table
      Figure 3 – Click Close & Load on the Power Query Editor to create your table
      Figure 4 – The table has been created
      Figure 4 – The table has been created

    Once you have your list or table created with your custom items, you are ready to add your NL Rows function to your report. On a new tab in the workbook, enter the Jet row replicator function NL Rows and, instead of selecting a table from your cube to reference, select the table or list you created on the hidden sheet. Make sure to press F4 to hold the cell references to your list; otherwise, the reference will change and be lost as the rows replicate.

    You can type in the formula as: =NL(“Rows”,table reference cells). See Figure 5.
    Figure 5 – NL Rows formula
    Figure 5 – NL Rows formula

    Alternatively, you can use the Jet Function Wizard. Set the function to NL. The What field should be “Rows”, and the Table field should be a cell reference to your custom list or table (see Figure 6).
    Figure 6 – Jet Function Wizard rows
    Figure 6 – Jet Function Wizard rows

    Now you can build other Jet and Excel functions in the rest of your report that use or reference your replicating rows to create a report with a custom list to fit your needs.
    Figure 7 – Custom row replicator report example
    Figure 7 – Custom row replicator report example

    Learn more about the reporting options for Dynamics NAV and Business Central.

    If you have any questions about or need help with BI/CPM, Jet Global, Jet Reports, or Dynamics 365 Business Central or NAV for any version, contact ArcherPoint.

    Read more "How To" blogs from ArcherPoint for practical advice on these topics and more.

     

      Use the String Function in Microsoft Dynamics Business Central On Premises

      $
      0
      0

      How to: Use the String Function in Microsoft Dynamics Business Central On Premises How to customize Dynamics Business Central or NAV using the string function

      This blog provides a step-by-step guide to using the String function in Microsoft Dynamics Business Central for customizations.

      1. Open Visual Studio.
      2. Create a Code unit for the string function.
        Figure 1 – Creating a code unit for the String Function in Microsoft Dynamics Business Central
        Figure 1 – Creating a code unit for the String Function in Microsoft Dynamics Business Central
      3. Create a page extension.
        Figure 2 – Creating a page extension for the String function in Microsoft Dynamics Business Central
        Figure 2 – Creating a page extension for the String function in Microsoft Dynamics Business Central
      4. Click F5 or click on View, then Click on >AL: Publish. The Vendor page will open; go to Navigate -> vendor-> ConcateAction(Action name).
        Figure 3 – Action is added after Bank Accounts and name of the action is ConcateAction in Microsoft Dynamics Business Central
        Figure 3 – Action is added after Bank Accounts and name of the action is ConcateAction in Microsoft Dynamics Business Central
        Final output:
        Figure 4 –Output of the MAXSTRLEN Keyword in Microsoft Dynamics Business Central
        Figure 4 –Output of the MAXSTRLEN Keyword in Microsoft Dynamics Business Central

      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 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/BC Development Blogs.

       

      Blog Tags: 

      Sending an Email Through PowerShell Coding

      $
      0
      0

      How To: Send an Email Through PowerShell Scripts How to send an email through PowerShell Scripts

      Typically, people use Outlook or other tool for emails. But if you want to be able to send an email without having to go into Outlook because it can cause you to get distracted, taking you away from what you’re working on, there is another method. This blog explains how to use a PowerShell script to send an email.

      1. Open your PowerShell ISE. Following are some specifications required for emailing:
      • $EmailFrom : Specifies the sender information – The example in Figure 1 shows abc.01@gmail.com sending an email to abc.01gmail.com
      • $EmailTo: Specifies the recipient of the mail
      • $subject: Specifies the subject of the email you want to send
      • $Body: Specifies the body of the message
      • $SMTPServer: The mail server you will be using to send the email
      • $SMTPClient: The name of the client; create a newobject and call the system.netmail.api and pass the smtpserver info
      • $SMTPClient.send: Specifies sending the email using .send command
        Figure 1 - PowerShell script for sending an email
        Figure 1 - PowerShell script for sending an email
      1. Press F5 to run the script. You will receive a message box like that one shown in Figure 2.
        Figure 2 – Message box indicating credentials are required
        Figure 2 – Message box indicating credentials are required
      2. Specify the password of your Gmail account and click OK.
      3. You can now check your email. Figure 3 shows what it looks like to receive an email.
        Figure 3 – Email notification in PowerShell
        Figure 3 – Email notification in PowerShell

       

      If you have any questions about this or other Dynamics NAV or Business Central topic 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.

      Blog Tags: 

      Using Jobs and Work Type Codes to Control Job Costs and Prices in Microsoft Dynamics NAV or Business Central

      $
      0
      0

      How To: Use Jobs and Work Type Codes to Control Job Costs and Prices in Microsoft Dynamics NAV or Business Central How to use Dynamics NAV Jobs and Work Types to control costs

      In Microsoft Dynamics NAV or Business Central, you can use work type codes to control your job costs and prices. On the Resources card, you can have a general rate for the resource, but for the work type, you can control the rate based on a state they work in or the type of work they do or other variation.  The same holds true to price for setup.  The one difference between Price and Cost is that, for Cost you can make changes based on a new fixed cost or you can get into added dollars or added %. When you use the work types on the job planning lines, this will affect your budget/expected cost. 

      H2: Setup

      1. Edit or Create a New Resources that you use on a Job
        On the Home Tab or Navigation Tab you will see “Cost” and “Prices”
        Figure 1 – Resource card with “Cost” and “Prices” highlighted in Microsoft Dynamics NAV or Business Central
        Figure 1 – Resource card with “Cost” and “Prices” highlighted in Microsoft Dynamics NAV or Business Central
      2. For different cost options, there is a new option for the cost change: You can choose from Fixed, %Extra or $Extra.
        Figure 2 – Setting up resource costs in Microsoft Dynamics NAV or Business Central
        Figure 2 – Setting up resource costs in Microsoft Dynamics NAV or Business Central
      3. For Prices there are no different options—just a fixed price.
        Figure 3 – Setting up resource prices in Microsoft Dynamics NAV or Business Central
        Figure 3 – Setting up resource prices in Microsoft Dynamics NAV or Business Central

      The Job Planning Lines

      1. When you create the Job Planning lines for a job, make sure you move the work type code just after the entry of the Resource number.
      2. In Figure 4, you can see the different Unit Costs and Unit Prices based on the setup.
        Figure 4 – Unit Costs and Unit Prices in the setup of Job Planning Lines in Microsoft Dynamics NAV or Business Central
        Figure 4 – Unit Costs and Unit Prices in the setup of Job Planning Lines inMicrosoft Dynamics NAV or Business Central

      Note, the screen shots used in this blog are from Microsoft Dynamics NAV 2018. 

      If you have any questions about this or other Dynamics NAV or Business Central topic 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.

       


      AL Programming for Dynamics Business Central On Premises – Data Types

      $
      0
      0

      How To: Use the Dictionary, RecordID, RecordRef, and BigText Data Types in AL Programming for Dynamics Business Central On Premises How To: program in AL code using Dictionary, RecordID, RecordRef and Big Data Types

      There are many data types that are used in the AL programming language, used to modify code in Dynamics Business Central On Premises. This blog explains how to use the Dictionary, RecordID, RecordRef, and BigText data types.

      Dictionary Data Type

      The Dictionary data type represents a collection of keys and values. Dictionary consists of a value and its associated key. Every key in a Dictionary must be unique. Following is an example:

      1. Create a codeunit using the ‘tcodeunit’ snippet and then provide the ID number and name of the codeunit.
      2. Create a procedure using the ‘tproceure’ snippet.
        Figure 1 – Creating a procedure by using a snippet in Dynamics Business Central on premises
        Figure 1 – Creating a procedure by using a snippet in Dynamics Business Central on premises

      In Figure 1, we are trying to store the customer name of that specific ID.

      The variable mycustomers represents Dictionary data types:

      1. Each addition to the Dictionary consists of a value and its associated key.
      2. Every key in a Dictionary must be unique.
      3. A key cannot be null, but a value can be, only when the value type is a reference type.

      In above scenario, we are storing customer number and name and presenting the name of that specified customer by the Message function.

      RecordID & RecordRef

      Record Ref references a record in a table. There are many records available; some are presented below:

      Number Method: Identify the number of record

      Syntax:    No: = RecordRef.Number()

      Name Method: Identify the name of record

      Syntax: Name := RecordRef.Name()

      Record ID contains the table number and the primary key of a table. Two instances are there.

      Table no() :provides the table number of the table that is identified by the Record ID.

      Get Record () : Gets a RecordRef that refers to the record identified by the Record ID.

      1. Create a codeunit to show an instance.
      2. Let’s go through an example of table no.
        Figure 2 – RecordID & RecordRef data types in Dynamics Business Central on premises
        Figure 2 – RecordID & RecordRef data types in Dynamics Business Central on premises

      BigText Data Types

      The BigText data type handles large text documents. There are many methods available; three of them presented below.

      AddTextMethod : Add text to the string.

      Syntax : BigText.AddText(String: String, [Position: Integer])

      Length () : Retrieves the length.

      Syntax : Length :=   BigText.Length()

      Textposition : Gets the position at which a specific string first occurs in this BigText instance

      Syntax : Position :=   BigText.TextPos(String: String)

      GetSubtext : Gets part of a BigText variable

      Syntax : [Length := ]  BigText.GetSubText(var Variable: BigText, Position: Integer, [Length: Integer])
      Figure 3 –BigText data types in Dynamics Business Central on premises
      Figure 3 –BigText data types in Dynamics Business Central on premises

      If you have any questions about this or other Dynamics NAV or Business Central topic 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.

      Blog Tags: 

      Setting Up and Using Time Sheets in Microsoft Dynamics NAV 2018

      $
      0
      0

      How To: Set Up and Use Time Sheets in Microsoft Dynamics NAV 2018 How to setup and use Time Sheets in Microsoft Dynamics NAV 2018

      For companies that use Microsoft Dynamics NAV and have employees who need to track time against a job, for service, or for HR, there is a feature that does not typically get attention during the initial implementation or if your company is growing. This blog explains how to set up and use the Time Sheets feature in Microsoft Dynamics NAV 2018.

      Setting Up the Time Sheets Feature

      1. For the Search Resource setup, you will need to fill in the following fields:
      • Time Sheet Nos
      • Time Sheet First Weekday
      • Time Sheet by Job Approval
        • Never = One the Resource card the approval user is the person to approve the time sheets
        • Always = On the Job card, the “Person Responsible” approves the time
        • Machine Only =
          • If a machine time sheet is linked to a job, the “Person Responsible” on the Job card approves the time sheet
          • If the machine time sheet is linked with a resource, the “Time Sheet Approver User ID” approves
            Figure 1 – Resource Setup in Microsoft Dynamics NAV 2018
            Figure 1 – Resource Setup in Microsoft Dynamics NAV 2018
      1. Once you have the base settings set up, you will need to set up a Time Sheet Administrator:
      • Search User Setup. Note: You are only allowed to have one Administrator
      • Place your cursor on the line of the user you want to be the admin, then “Check Time Sheet Admin”.
        Figure 2 – User Setup in Microsoft Dynamics NAV 2018
        Figure 2 – User Setup in Microsoft Dynamics NAV 2018
      1. Next, you will need to set up Resources to be allowed to be associated and linked with time sheets.  Note: When you have an employee set up with time sheets, their time must go through time sheets and then to the appropriate areas.
      • Search for Resources.
      • Check “Use Time Sheet”.
      • Select the time sheet user ID that will be linked with these resources.  Note: Only one resource can be linked to a user ID.
      • Select the time sheet to approve the user ID.
        Figure 3 – Setting up a resource to be associated with a time sheet in Microsoft Dynamics NAV 2018
        Figure 3 – Setting up a resource to be associated with a time sheet in Microsoft Dynamics NAV 2018

      Once your resource is set up, you can create time sheets for your resource, employee, or contractor.  There are two ways to create time sheets; one is from the Resource Card, and the other is from the time sheet. Note: Time sheets are created based on a week.

      Creating a Time Sheet from the Resource Card

      1. From the Resource Card home tab or Actions tab, select Create Time Sheets.
        Figure 4 – Creating a time sheet from the Resource card in Microsoft Dynamics NAV 2018
        Figure 4 – Creating a time sheet from the Resource card in Microsoft Dynamics NAV 2018
      2. Enter the start date as Monday and the number of periods as the number of weeks. Click OK.
        Figure 5 – Entering the Starting Date and No. of Periods for time sheets in Microsoft Dynamics NAV 2018
        Figure 5 – Entering the Starting Date and No. of Periods for time sheets in Microsoft Dynamics NAV 2018

      Entering Time Against a Time Sheet

      1. Search for Time Sheets.
        Figure 6 – Searching for Time Sheets in Microsoft Dynamics NAV 2018
        Figure 6 – Searching for Time Sheets in Microsoft Dynamics NAV 2018
      2. Edit the proper time sheet.
        Figure 7 – Editing a time sheet in Microsoft Dynamics NAV 2018
        Figure 7 – Editing a time sheet in Microsoft Dynamics NAV 2018
      3. Enter the activity/time as your business processes indicates:
        1. Type – Select Resource, Job, Service, Absence, or Assembly Order.
        2. Description – You leave what is defaulted, but you can change the description as to what best fits your work.
        3. Work Type Code – This field is associated with the resource’s cost and or price for different rates, depending on the type of work.
        4. Enter the number of hours by day for this task.
      4. Create as many lines as you need.
        Figure 8 – Creating lines in a time sheet in Microsoft Dynamics NAV 2018
        Figure 8 – Creating lines in a time sheet in Microsoft Dynamics NAV 2018

      5. When ready, you can submit your time sheets. You will have the option to submit just one line or multiple lines. Note: Look on the right in the Fact Box Actual/Budget Summary.
        When you submit the lines, that status will change from Open to Submitted.
        Note:
        For days absent from work, you must have a resource and employee set up and linked together.
        If needed, you can re-open your time sheet and make changes as needed, but you will need to submit it again.

      Reviewing and Approving or Rejecting Time Sheets

      1. Approver settings come from the Setup option in “Resource Setup,” depending on the rules you have set.
      2. To review submitted time, search “Manager Time Sheets”; for NAV 2017, search “Time Sheets to Approve”.
      3. Review and approve or reject as needed. Place your cursor on the line; then in the ribbon, select Approve. The Status will change. You can also reject the line. Note: Look on the right in the Fact Box Actual/Budget Summary.
        Figure 9 – Reviewing, approving, or rejecting a time sheet in Microsoft Dynamics NAV 2018
        Figure 9 – Reviewing, approving, or rejecting a time sheet in Microsoft Dynamics NAV 2018
      4. When all lines have been approved or rejected, you can move on to the next time sheet.
        Note: If you have time entries that need to go to a different area based on the type of activity, you will need to open the appropriate journal and process the lines.

      Posting Time to the Resource Journal

      1. Open NAV.
      2. Search for Resource Journal.
      3. From the Resource Journal, select “Suggest Lines from Time Sheet”. Click OK.
      4. Review the lines and make any adjustments as needed.
      5. When ready, select Post.
        Note: The lines are posted to the resource journal to hit the Resource ledger entries for proper reporting.

      Posting to the Job Journal

      1. Open NAV.
      2. Search for Job Journal.
      3. From the Job Journal, select “Suggest Lines from Time Sheet”. Click OK.
      4. Review the lines.
      5. When ready, select Post.
        Note: The lines are posted to the Job journal to hit the Job Cost for proper budget vs. cost on Jobs.

       

      If you have further questions about time sheet functionality 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/BC Development Blogs

       

      Blog Tags: 

      Using Purchase Order Dates in Microsoft Dynamics NAV 2017

      $
      0
      0

      How To: Use Purchase Order Dates in Microsoft Dynamics NAV 2017 How to use purchase order dates in Microsoft Dynamics NAV 2017

      Date fields on NAV 2017 purchase orders can be confusing, but used correctly, they will improve your purchase order processing. The dates are designed to allow you to schedule the receipt of product in time to meet your shipment commitments and your customer’s delivery expectations.

      There are ten dates that can be used when processing Purchase Orders in NAV 2017. Five are on the purchase header, four are on both the header and lines, and one is only on the lines. The use of the header-only dates is straightforward. The dates that are on both header and lines interact with each other and must be used more carefully.

      Purchase Order Dates – General FastTab

      By default, the Purchase Header General FastTab has four dates.
      Figure 1 – The Purchase Order Header Fast Tab with dates highlighted in Microsoft Dynamics NAV 2017
      Figure 1 – The Purchase Order Header Fast Tab with dates highlighted in Microsoft Dynamics NAV 2017

      1. Document Date– Defaults to the date the document was created. Document Date is used by NAV to calculate the due date of the payment for the order. Note: If the Posting Date is changed, and there are no inbound documents for the order, the Document Date will change to the same date as the Posting Date. It can be changed without affecting the Posting Date.
      2. Posting Date– Defaults to the date the document was created. This date can be changed by the user. It is used by the system when posting transactions to the Ledger Entry tables. It is also used when creating various related documents like Posted Receipts.
      3. Due Date – The date payment is due to avoid payment penalties [Document Date + payment terms = Due Date]. This date can be changed without affecting the document date.
      4. Order Date– The date the order was created. NAV populates this with the work date when the order is created. It can be changed, but typically would not be as it is the record of when the order was created. If the date is changed, since this date is also on the line records, the system will warn the user that the line order dates were not changed. They can be manually changed if desired.

      Purchase Order Dates – Invoice Details FastTab

      By default, the Purchase Header Invoice Details FastTab has four dates.
      Figure 2 - The Purchase Header Invoice Details FastTab has four dates in Microsoft Dynamics NAV 2017
      Figure 2 - The Purchase Header Invoice Details FastTab has four dates in Microsoft Dynamics NAV 2017

      1. Expected Receipt Date– The date you expect the goods to be available in the storage location. By default, this date is not populated on the header since it relates to the date line items are expected, and that can be different by line. However, if the date on the header is changed, the system will ask if you want to update the date on the lines. If you answer “Yes”, the system will populate every line item with the new Expected Receipt Date. The system will then recalculate the Order Dates and Planned Receipt Dates for the line items. See the Purchase Lines section below for more information.
      2. Pmt. Discount Date– This date is calculated based on the Document Date + the discount portion (if any) of the payment terms. If there is no discount associated with the payment terms, this date will be equal to the Document Date.
      3. Requested Receipt Date–The date you have requested that the goods be delivered to your location. By default, this date is not populated on the header since it relates to when line items are requested, and that can be different by line. However, if you set or change the date on the header, the system will ask if you want to update the date on the lines. If you answer “Yes”, the system will populate every line item with the Requested Receipt Date. The system will then recalculate the Order Dates, Planned Receipt Dates, and Expected Receipt Dates for the line items. See the Purchase Lines section below for more information. The Requested Receipt Date field allows you to record the date you wanted to receive the goods from the vendor.  This date is not recalculated so once established it gives you a marker to measure your vendor’s performance against this requested date.
      4. Promised Receipt Date– The date your vendor promised that you would receive the goods at your location. By default, this date is not populated on the header since it relates to when line items are promised, and that can be different by line item. However, if you set or change the date on the header, the system will ask if you want to update the date on the lines. If you answer “Yes” the system will populate every line item with the Promised Receipt Date. The system will then recalculate the Order Dates, Planned Receipt Dates, and Expected Receipt Dates for the line items. See the Purchase Lines section below for more information.

      Purchase Order Dates – Invoice Details FastTab

      By default, the Purchase Header Prepayment FastTab has two dates.
      Figure 3 – The Purchase Header Prepayment FastTab has two dates in Microsoft Dynamics Business Central online
      Figure 3 – The Purchase Header Prepayment FastTab has two dates in Microsoft Dynamics Business Central online

      1. Prepayment Due Date– If prepayment is required, the date prepayment is due to avoid penalties.
      2. Prepayment Payment Discount Date– If prepayment is required, the date prepayment is due to take any discounts offered.

      Purchase Order Dates – Lines

      Many of the same dates on the Purchase Header are also on the lines. Based on the line dates, NAV 2017 can do replenishment calculations.

      Note: These five dates – Order Date, Planned Receipt Date, Expected Receipt Date, Promised Receipt Date, and Requested Receipt Date– are related to each other. Changing one of these dates will cause the system to recalculate one or more of the other dates.

      The best way to think about NAV Purchase Order dates is to realize that Dynamics NAV basically tries to get to a Planned Receipt Date as a baseline and then does calculations based on planning parameters to get to dates that are useful to the users.
      Figure 4 – Purchase Order dates in Microsoft Dynamics NAV 2017
      Figure 4 – Purchase Order dates in Microsoft Dynamics NAV 2017

      1. Order Date– Defaults to the date the order was created. NAV populates this with the work date at the time the order is created. Order Date should normally not be changed. It is better to change other dates to reflect what should happen to the order lines. Changing the Order Date will recalculate other dates.
      2. Planned Receipt Date– The date you expect the order to arrive at your facility [Order Date + (the greater of Item Lead Time Calculation or Vendor Lead Time Calculation) = Planned Receipt Date]. If no lead times exist on the item or vendor cards, the Planned Receipt Date = Order Date. This date can be calculated forward (as from the Order Date in the above example) or backward (as from the Expected Receipt Date example below).
      3. Expected Receipt Date– The date you expect the inventory to be available for use in the system [Planned Receipt Date + Safety Lead Time + Inbound Warehouse Handling Time = Expected Receipt Date]. If the Expected Receipt Date is changed manually, the system will recalculate the Planned Receipt Date = Expected Receipt Date – Inbound Whse. Handling Time - Safety Lead Time.
      4. Promised Receipt Date– The date your vendor promised that you would receive the goods. This is set manually, and the system will not recalculate this date. NAV sets the Planned Receipt Date = Promised Receipt Date and then makes appropriate calculations using lead times and handling times.
      5. Requested Receipt Date – The date you have requested that the goods be delivered to your location. Once set, the system will not recalculate this date, so it serves as a marker to measure vendor performance against this requested date. If you set this date, NAV sets the Planned Receipt Date = Requested Receipt Date and then makes appropriate calculations using lead times and handling times. Note: The system will not allow you to change the Requested Receipt Date if the Promised Receipt Date has been set.

       

      If you have any 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/BC Development Blogs.

      Microsoft Business Central File Handling Part 1

      $
      0
      0

      How To: Handle Files in Microsoft Dynamics Business Central Online: A 4-Part Series How to handle files in Dynamics 365 Business Central online - Part 1

      I recently attended the Microsoft Directions Asia Conference for the first time. Eight employees from ArcherPoint participated in or attended nearly 80 sessions presented by Microsoft and ISVs. Team members went to different sessions and shared that knowledge. The experience was awesome.

      The conference showcased for the first time the April '19 Release of Dynamics 365 Business Central. The Microsoft team also announced the end of Windows Client starting with the October '19 release and presented best practices for moving forward with Visual Studio Code and AL.  

      We also learned some practical applications, including best practices for handling files in Microsoft Dynamics Business Central online. This series of four blogs will explain how to:

      • Export to Excel and download the file
      • Upload a file and store it in a table
      • Update an existing Excel file
      • Email the exported file

      This blog explains how to export to Excel and download the file.

      Exporting to Excel and Downloading the File

      With Business Central online, you don’t have access to the filesystem. However, it is a common scenario to upload or export files. The choice for Excel files is because this is by far the most used file type to export and import files. Other file types, like comma separated text or XML files can also be handled with XML ports. But Excel files are more complex to create. We will make use of the standard features of Business Central, like the Excel Buffer table. There is no need to install any other tool. The prerequisites are:

      • Dynamics 365 Business Central Sandbox Environment
      • Dynamics 365 Business Central should run from Azure Cloud

      In this exercise, we are going to export customer records to Excel. Before you start, you need to create an empty AL workspace in VS Code. Remove the HelloWorld.al file from the workspace after it has been created. NOTE: This blog does not cover the steps to create an AL workspace.

      Create A Codeunit to Loop Through the Customer Table

      1. Create a new codeunit 50100 “Export Customer 2 Excel”
      2. Create a function Export2Excel
      3. Call the function from the OnRun trigger

      Fill the Excel Buffer Table

      1. Create a new function, FillExcelRow, with two parameters: TempExcelBuf and Customer.
      2. In the function FillExcelRow, create lines to fill the Excel row with the fields of the Customer record.
      3. Create a function, FillExcelBuffer, with parameter TempExcelBuffer.
      4. In the function FillExcelBuffer, create a local variable Customer.
      5. In the function FillExcelBuffer, loop through the Customer table and call the function FillExcelRow.
      6. In the function Export2Excel, create a local variable called TempExcelBuf.
      7. In the function Export2ExcelBuf, call the function FillExcelBuffer.

      Export the Excel Buffer Table to an Excel File and Download It

      1. Create a function, OpenExcelFile, with parameter TempExcelBuf.
      2. In the function OpenExcelFile, write code to create the Excel file and download it to the client.
      3. In the function Export2ExcelBuf, call the function OpenExcelFile.

      The whole codeunit should now like look this:
      Figure 1 – Creating a Codeunit in Microsoft Dynamics Business Central online
      Figure 1 – Creating a Codeunit in Microsoft Dynamics Business Central online

      Run the Codeunit

      It makes sense to run the codeunit from the Customer List page, so let’s create a page extension and add a function to run the codeunit:

      1. Create a new page extension for the Customer List.
      2. Add an action to the page extension.
      3. Publish the extension and use the action on the Customer List page to test the Excel download.

      Figure 2 – List page to test an Excel download in Microsoft Dynamics Business Central online
      Figure 2 – List page to test an Excel download in Microsoft Dynamics Business Central online

      Stay tuned for the next blog in this series that discusses how to upload a file and store it in a table.

       

      If you have any 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 more NAV/Business Central development, check out our collection of NAV/BC Development Blogs.

      Blog Tags: 

      Using Sales Order Dates in Microsoft Dynamics NAV 2018

      $
      0
      0

      How to Use Sales Order Dates in Microsoft Dynamics NAV 2018

      How To: Use Sales Order Dates in Microsoft Dynamics NAV 2018

      Date fields on NAV 2018 sales orders can be confusing, but used correctly, they will improve your sales order processing. The dates are designed to allow you to plan the shipments to meet your customer’s delivery expectations.

      There are ten date options when processing sales orders in NAV 2018. Six are on the sales header, four are on both the header and lines, and one is only on the lines. The use of the header-only dates is straightforward. The dates that are on both header and lines interact with each other and must be used more carefully.

      Sales Order Dates – General FastTab

      By default, the Sales Header General FastTab has six dates, as seen in Figure 1.

      Figure 1 – Sales Header General FastTab with six dates highlighted in Microsoft Dynamics NAV 2018
      Figure 1 – Sales Header General FastTab with six dates highlighted in Microsoft Dynamics NAV 2018

      1. Document Date– Defaults to the date the document was created. Document Date is used by NAV to calculate the due date of the payment for the order. This date also is used to calculate finance charges based on the grace period for finance charge terms.
      2. Posting Date– Defaults to the date the document was created. This date can be changed by the user. It is used by the system when posting transactions to the Ledger Entry tables. It is also used when creating various related documents like Posted Shipments and Posted Invoices.
      3. Order Date– The date the order was created. NAV populates this with the work date when the order is created. It can be changed, but typically would not be as it is the record of when the order was created. If the date is changed, since this date is also on the line records, the system will warn the user that the line order dates were not changed. They can be manually changed if desired.
      4. Due Date – The date payment is due for the custom to avoid payment penalties: [Document Date + payment terms = Due Date]. This date can be changed without affecting the document date.
      5. Requested Delivery Date – The date the customer has asked for the order to be delivered. The shipment date is calculated from this field. If the date is changed, since this date is also on the line records, the system will ask the user if they want the line dates changed.

      By default, this date is not populated on the header since it relates to when line items are requested, and that can be different by line. However, if you set or change the date on the header, the system will ask if you want to update the date on the lines. If you answer “Yes,” the system will populate every line item with the Requested Delivery Date. The system will then recalculate the Order Dates, Planned Delivery Dates, Planned Shipment Dates, and Shipment Date for the line items. See the Sales Lines section below for more information.

      The Requested Delivery Date field allows you to record the date the customer wanted to receive the goods. This date is not recalculated, so once established it gives you a marker to measure your customer’s requested date vs. the actual delivery date. Also, when you fill in the Promised Delivery Date, you are prevented from changing the Requested Delivery Date.

      1. Promised Delivery Date – The date by which you have promised the customer to deliver the order. By default, this date is not populated on the header since it relates to when line items are promised, and that can be different by line item. However, if you set or change the date on the header, the system will ask if you want to update the date on the lines. If you answer “Yes,” the system will populate every line item with the Promised Delivery Date. The system will then recalculate the Order Dates, Planned Delivery Dates, Planned Shipment Dates, and Shipment Dates for the line items. See the Sales Lines section below for more information.

      Sales Order Dates – Invoice Details FastTab

      By default, the Sales Header Invoice Details FastTab has one date, as shown in Figure 2.

      Figure 2 – Invoice Details FastTab with two dates highlighted in Microsoft Dynamics NAV 2018
      Figure 2 –Invoice Details FastTab with two dates highlighted in Microsoft Dynamics NAV 2018

      1. Pmt. Discount Date– Calculated based on the Document Date + the discount portion (if any) of the payment terms. If there is no discount associated with the payment terms, this date will be equal to the Document Date.

      Sales Order Dates – Shipping and Billing Details FastTab

      By default, the Sales Header Shipping and Billing FastTab has one date, as shown in Figure 3.

      Figure 3 – Shipping and Billing Details FastTab with two dates highlighted in Microsoft Dynamics NAV 2018
      Figure 3 – Shipping and Billing Details FastTab with two dates highlighted in Microsoft Dynamics NAV 2018

      1. Shipment Date– Defaults to the work date. The Shipment Date specifies the date the items are to be available in inventory, so the warehouse can pick the items for shipment. However, if you set or change the date on the header, the system will ask if you want to update the date on the lines. If you answer “Yes” the system will populate every line item with the Shipment Date. The system will then recalculate the Order Dates, Planned Delivery Date, and Planned Shipment Date for the line items. See the Sales Lines section below for more information

      Sales Order Dates – Prepayment FastTab

      By default, the Sales Header Prepayment FastTab has two dates, as shown in Figure 4.

      Figure 4 – Sales Header Prepayment FastTab with two dates highlighted in Microsoft Dynamics NAV 2018
      Figure 4 –Sales Header Prepayment FastTab with two dates highlighted in Microsoft Dynamics NAV 2018

      1. Prepayment Due Date– If prepayment is required, the date prepayment is due to avoid penalties.
      2. Prepayment Payment Discount Date– If prepayment is required, the date prepayment is due to take any discounts offered.

      Sales Order Dates – Lines

      Many of the same dates on the Sales Header are also on the lines. Based on the line dates, NAV 2018 can do replenishment calculations.

      NOTE: These five dates – Shipment Date, Planned Shipment Date, Requested Delivery Date, Planned Delivery Date, Promised Delivery Date– are related to each other. Changing one of these dates will cause the system to recalculate one or more of the other dates.

      The best way to think about NAV Sales Order dates is to realize that NAV tries to get to a Planned Shipment Date as a baseline and then does calculations based on planning parameters to get to dates that are useful to the users, as shown in Figure 5.

      Figure 5 – Calculations based on planning parameters with Planned Shipment Date as the baseline in Microsoft Dynamics NAV 2018
      Figure 5 –Calculations based on planning parameters with Planned Shipment Date as the baseline in Microsoft Dynamics NAV 2018

      1. Shipment Date– The date you expect your inventory to be available in stock. The line’s shipment date gets auto-populated from the sales header shipment date, but you can change this and have different dates on the lines. If you change the date on the header, the system will ask if you want to change the date on the lines.
      2. Planned Shipment Date– The date you expect inventory to ship from the warehouse: [Shipment Date + Outbound Warehouse Handling Time = Planned Shipment Date]. If the Planned Shipment Date is changed manually, the system will recalculate the Planned Shipment Date = Shipment Date + Outbound Warehouse Handling Time.
      3. Requested Delivery Date – The date your customer would like to have the goods delivered. Once set, the system will not recalculate this date, so it serves as a marker to measure your performance against the customer's requested date. If you set this date, NAV sets the Planned Delivery Date = Requested Date calculations using lead times and handling times.
      4. Planned Delivery Date– The date you expect the order to arrive at your customer's facility: [Requested delivery date – shipping time = Planned Delivery Date]. If the customer doesn’t request a delivery date or the requested delivery date cannot be met, the program calculates the planned shipment date by (Shipment Date + Shipment Time = Planned Delivery Date). If the Planned Delivery Date is changed manually, the system will recalculate the Planned Delivery Date = Requested Delivery Date – Shipping Time.
      5. Promised Delivery Date– The date you promised the customer the goods would arrive at their facility. This is set manually, and the system will not recalculate this date. NAV sets the Planned Delivery Date = Promised Delivery Date and then makes appropriate calculations shipping time and handling times.

      Contact ArcherPoint with your questions about date and date calculations in Dynamics NAV or Business Central. You may also be interested in our blog, Using Purchase Order Dates in Dynamics NAV 2017.

      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/BC Development Blogs.

       

       

      Blog Tags: 

      Microsoft Business Central File Handling Part 2

      $
      0
      0

      How To: Upload a File and Store It in a Table in Microsoft Dynamics Business Central Online - Part 2 of a 4-Part Series How to Upload a file and store it in a table using Microsoft Dynamics 365 Business Central SaaS/Online

      At the Microsoft Directions Asia Conference, a team from ArcherPoint attended many sessions and shared their experiences. On a large scale, the conference unveiled the April '19 Release of Dynamics 365 Business Central as well as announcing the end of Windows Client beginning with the October '19 release. They also shared best practices for continuing on with Visual Studio Code and AL.  

      In addition, we left the conference with some practical applications. This blog series discusses handling files in Microsoft Dynamics Business Central online, including:

      Part 1 explained how to export a file to Excel and then download it. This blog explains how to upload a file and store it in a table.

      Uploading a File and Storing It in a Table

      A common scenario is to allow users to upload a file to the application. Uploaded files can serve different purposes, like importing data or linking a file to a record. In this example, we are going to upload an Excel file and store it in a table. In the following example, we will use this file as a template to fill with data and then download it to the user.

      Prerequisites:

      • Dynamics 365 Business Central Sandbox Environment.
      • Dynamics 365 Business Central should run from Azure Cloud

      This task includes the following steps:

      1. Create a table to store the file
      2. Create a list page
      3. Create a function to select and upload an Excel file
      4. Call the function from the list page

      Here are the steps:

      1. Create a new table that looks like the table in Figure 1 to store the file. The table will have a BLOB field in which to store the file content.
        Figure 1 – Creating a table in Microsoft Dynamics Business Central online
        Figure 1 – Creating a table in Microsoft Dynamics Business Central online
      2. Create a list page, which will contain the fields and a checkbox to indicate if the BLOB contains a file.
        Figure 2 – Creating a list page in Microsoft Dynamics Business Central online
        Figure 2 – Creating a list page in Microsoft Dynamics Business Central online
      3. Add a function to the table to select and upload an Excel file. In this example, we are using  the File Management Codeunit, which provides functions that are safe for both online and on-premesis.
        Figure 3 – Adding a function in Microsoft Dynamics Business Central online
        Figure 3 – Adding a function in Microsoft Dynamics Business Central online
      4. Call the function from the list page by adding an action to the page that calls the ImportTemplateFile function in the table.
        Figure 4 – Calling a function from the list page in Microsoft Dynamics Business Central online
        Figure 4 – Calling a function from the list page in Microsoft Dynamics Business Central online
      5. Publish the app again, open the Excel Template page, and test the upload function. Use the Order Template.xlsx file from the materials; this file will be used in the next blog in the series, Updating an Existing Excel File.

      Stay tuned for the next blog in this series. If you have any 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/BC Development Blogs.

        Blog Tags: 

        Microsoft Business Central File Handling Part 3

        $
        0
        0

        How To: Update an Existing Excel File in Microsoft Dynamics Business Central Online - Part 3 of a 4-Part Series How to update an Existing Excel File in Microsoft Dynamics 365 Business Central

        The Microsoft Directions Asia Conference offered many sessions on a variety of topics. The big news was the unveiling of the April '19 Release of Dynamics 365 Business Central and the announcement of the end of Windows Client beginning with the October 2019 release.  

        The ArcherPoint team also gained some practical knowledge, such as handling files in Microsoft Dynamics Business Central online.

        This blog series discusses each of those tasks. Part 1 explained how to export a file to Excel and download it, while Part 2 discussed uploading a file and storing it in a table. This blog explains how to update an existing Excel file.

        Updating an Existing Excel File in Microsoft Dynamics Business Central Online

        In the example in the first blog in this series, we generated an Excel file from scratch. But what if you want to export an Excel file that contains a certain layout and design? The best way to do that is to prepare an Excel file with the desired layout and use that as a template.

        The overall process is not so different from exporting a new Excel file. The differences are that we now need to first initialize the Excel Buffer table with the file that we want to use. Secondly, we are not just adding rows but instead setting the value of specific cells.

        In this example, we are going to use the Order Template.xlsx file and fill it with the data of a sales order. To keep it simple, we assume the file is in the first record of the Excel Template table.

        Prerequisites:

        1. Dynamics 365 Business Central Sandbox Environment
        2. Dynamics 365 Business Central should run from Azure Cloud
        3. Visual Studio Code

        This task includes the following steps:

        1. Create a codeunit and run it from a sales order list page
        2. Initialize the Excel Buffer table
        3. Fill the cells with data
        4. Close the Excel file and download it to the user

        Create a New Codeunit and Set the Table No. to Table Sales Header

        1. Create the function Export2Excel and call it from the OnRun trigger. Pass in the SalesHeader record that needs to be exported.
        2. Create a page extension for the Sales Order List page with an action to run the codeunit.

        This is the basic structure. We can now move on to create the code that exports the data.
        Figure 1 - Creating the function Export2Excel, calling it from the OnRun trigger in Microsoft Dynamics Business Central Online
        Figure 1 - Creating the function Export2Excel, calling it from the OnRun trigger in Microsoft Dynamics Business Central Online

        Initialize the Excel Buffer Table

        Before we can set any data, we need to initialize the Excel Buffer table with the Excel file that we will use as a template:

        1. Create a function InitExcel.
        2. Create a variable for the Excel Template table.
        3. Create an InStream variable.
        4. Read the content of the first record in the Excel Template table and create the InStream variable.
        5. Update the Excel Buffer table from the InStream variable. Pass in the name of the Excel worksheet that will hold the data.
        6. Call the InitExcel function from the Export2Excel function.

        Figure 2 – Initializing the Excel Buffer table in Microsoft Dynamics Business Central Online
        Figure 2Initializing the Excel Buffer table in Microsoft Dynamics Business Central Online

        Populate the Cells with Data

        The Excel template file is a prepared file; only the cells must be populated with data from the sales order.

        1. Create a function FillHeaderData to set all cell values for the Sales Order Header.
          Figure 3 – Creating a function FillHeaderData to set all cell values for the Sales Order Header in Microsoft Dynamics Business Central Online
          Figure 3 Creating a function FillHeaderData to set all cell values for the Sales Order Header in Microsoft Dynamics Business Central Online
        2. Create a function FillLineData to create the rows in the Excel template.
          Figure 4 – Creating a function FillLineData to create the rows in the Excel template in Microsoft Dynamics Business Central Online
          Figure 4 Creating a function FillLineData to create the rows in the Excel templatein Microsoft Dynamics Business Central Online
        3. Create a function FillExcelBuffer.
        4. Create a local variable for the Excel Buffer table.
        5. Call the function FillHeaderData and FillLineData with the local variable.
        6. Call the function WriteAllToCurrentSheet on the Excel Buffer table to store the data from the local variable to the Excel Buffer.
        7. Add a line to the function Export2Excel  to call the FillExcelBuffer function.
          Figure 5 – Adding a line to the function Export2Excel to call the FillExcelBuffer function in Microsoft Dynamics Business Central Online
          Figure 5 Adding a line to the function Export2Excel to call the FillExcelBuffer function in Microsoft Dynamics Business Central Online

        Close the Excel file and Download It to the User

        1. Add two lines to the Export2Excel function to close the Excel file and download it the user:

        TempExcelBuf ,CloseBook();

        TempExcelBuf ,OpenExcel();

        1. Publish the app and test it from the Sales Order List page.
        2. The codeunit should now look like Figure 6.
          Figure 6 – Codeunit after publishing the app and testing it from the Sales Order List page in Microsoft Dynamics Business Central Online
          Figure 6 Codeunit after publishing the app and testing it from the Sales Order List pagein Microsoft Dynamics Business Central Online

          Figure 7 – Publishing the app and testing it from the Sales Order List page in Microsoft Dynamics Business Central Online
          Figure 7
          Publishing the app and testing it from the Sales Order List pagein Microsoft Dynamics Business Central Online

        Stay tuned for the last blog in this series.

        If you have any 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/BC Development Blogs.

        Blog Tags: 

        Microsoft Business Central File Handling Part 4

        $
        0
        0

        How To: Email an Exported File From Microsoft Dynamics Business Central Online - Part 4 of a 4-Part Series How To: Email an Exported File From Microsoft Dynamics Business Central Online

        This series of blogs discusses handling files in Microsoft Dynamics Business Central online, which our team learned at this year’s Microsoft Directions Asia Conference. In Part 1, we explained how to export a file to Excel and download it. Part 2 explained how to upload a file and store it in a table. Part 3 explained how to update an existing Excel file. In our final blog, we discuss how to email an exported file from Microsoft Dynamics Business Central online.

        Emailing an Exported File from Microsoft Dynamics Business Central Online

        Another very common scenario is to email a file instead of downloading it to the user. To run this scenario, you need to set up SMTP in your Dynamics Business Central database. This exercise assumes that the SMTP settings are ready.

        The overall process is quite simple and can be used for other scenarios as well. The Excel Buffer table has a function to save the output file to a stream instead of downloading it to the user. When we have the data in the stream, we can do anything with it, like storing it in table, uploading it to a webservice, or emailing it.

        Prerequisites:

        1. Dynamics 365 Business Central Sandbox Environment.
        2. Dynamics 365 Business Central should run from Azure Cloud
        3. Visual Studio Code

        This task includes the following steps:

        1. Add a function to save the output of the Excel Buffer to the TempBlob table
        2. Add a function to email the content of the TempBlob table

        You can apply this to both export to Excel codeunits.

        Save the Output of the Excel Buffer to a Stream Variable

        Create a new codeunit and set the table no. to table Sales Header.

        1. Add a function ExportExcelFileToBlob that stores the output in a TempBlob variable
          Figure 1 - Adding a function ExportExcelFileToBlob that stores the output in a TempBlob variable in Microsoft Dynamics Business Central online
          Figure 1 - Adding a function ExportExcelFileToBlob that stores the output in a TempBlob variable in Microsoft Dynamics Business Central online

        Email the Content of the TempBlob Table

        1. Create a function EmailFile
        2. Create variables for TempBlob record SMTP Mail codeunit InStream.
        3. Call the ExportExcelFileToBlob function that we create in the previous step.
        4. Call the CreateMessage function of the SMTP Mail codeunit. Make sure to provide a valid sender and recipient email address.
        5. Add the content of the TempBlob table as an attachment to the email.
        6. Send the email.
        7. In the Export2Excel function, replace the line to open the Excel file with a call to the function EmailFile.
        8. Publish the app and test it. Don’t forget to set the SMTP settings first!
          Figure 2 - Emailing the content of the TempBlob Table in Microsoft Dynamics Business Central online
          Figure 2 - Emailing the content of the TempBlob Table in Microsoft Dynamics Business Central online

        If you have any 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/BC Development Blogs.

        Blog Tags: 

        Correcting the Issue of the Microsoft Business Central Developer Environment Crashing

        $
        0
        0

        How To: Correct the Issue of the Microsoft Business Central Developer Environment Crashing While Opening the C/AL Editor 

        How To: Correct the Microsoft Dynamics Business Central Developer Issue of C/AL Editor closing

        When you’re developing in C/AL in Business Central/NAV 2018, you might run into this issue: You want to edit the code in an object through the Developer Environment, and the Application automatically crashes or closes without displaying an error message. This occurs when you open a Codeunit or click on C/AL editor in a Page/Table, and it occurs only when you are designing the object and go to C/AL code by hitting F9.

        Following is the solution to this problem:

        1. Open the Business Central Development Environment from the command prompt.
        2. Set the path to your RTC folder and add this command at the end:

        C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\130\RoleTailoredClient\finsql.exe” useoldeditor=yes

        You can now open the Developer Environment and use the C/AL Editor without any issues.

        1. Simply close and reopen the Developer environment to change back to the new editor. Since this is a workaround to bypass the issue, you can close the dev environment once you finish the code changes in C/AL. The only disadvantage is that you will not be able to take advantage of the Intellisense feature.

        IMPORTANT NOTE: This change should be made before you start coding, because, once you hit F9, the system will start closing or crashing, so you won’t be allowed to make any code changes.

        If you have any 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/BC Development Blogs.

        Blog Tags: 

        How to Create a Purchase Quote and Convert It to an Order in Microsoft Dynamics Business Central or NAV

        $
        0
        0

        How to Create a Purchase Quote in Microsoft Dynamics Business Central or Dynamics NAV and Convert It to an Order

        How to Dynamically Filter in Jet Reports using a drop-down list

        In this blog, you’ll learn how to create a Purchase Quote and convert it to an Order in Microsoft Dynamics NAV or Business Central. You would use this for various reasons, including:

        • To purchase items or services
        • Receive the offers from vendors
        • Provide the prices and delivery time of items customers need
        1. In the search box, search for Purchase Quotes.
          Figure 1 – Purchase Quote option in the Search box in Microsoft Dynamics Business Central or NAV
          Figure 1 – Purchase Quote option in the Search box in Microsoft Dynamics Business Central or NAV
        2. To create a new Purchase Quote, click New in the home ribbon or use Ctrl +N.
          Figure 2 – Create a new Purchase Quote in Microsoft Dynamics Business Central or NAV
          Figure 2 – Create a new Purchase Quote in Microsoft Dynamics Business Central or NAV
          A Quote number is automatically generated specifying the series to which it belongs.
        3. Enter the vendor name and press Enter, which will automatically populate the header.
          Figure 3 – Enter the vendor details in Microsoft Dynamics Business Central or NAV
          Figure 3 – Enter the vendor details in Microsoft Dynamics Business Central or NAV
        4. After completing the details required:
          • Select the type field in the Line tab
          • Enter the item Number (it automatically populates the description)
          • Enter the location code
          • Enter the quantity that need to order
          • Enter the direct unit cost

        Figure 4 – Enter the item details in Microsoft Dynamics Business Central or NAV
        Figure 4 – Enter the item details in Microsoft Dynamics Business Central or NAV

        1. On the Action tab, click Make Order to create a Purchase Order from the Purchase Quote.
          Figure 5 – Convert a Purchase Quote to a Purchase Order in Microsoft Dynamics Business Central or NAV
          Figure 5 – Convert a Purchase Quote to a Purchase Order in Microsoft Dynamics Business Central or NAV

          Figure 6 – Message specifying the Order Number converted from the Quote Number in Microsoft Dynamics Business Central or NAV
          Figure 6 – Message specifying the Order Number converted from the Quote Number in Microsoft Dynamics Business Central or NAV

          Figure 7 – Purchase Order in Microsoft Dynamics Business Central or NAV
          Figure 7 – Purchase Order in Microsoft Dynamics Business Central or NAV

         

        If you have any questions about 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.

         

        Blog Tags: 

        How to Create a Quick Quote for Print Jobs in PrintVis

        $
        0
        0

        How To: Create a Quick Quote for a Print Job in PrintVis (embedded in Microsoft Dynamics Business Central)

        How to create a quick quote for printing companies in Microsoft Dynamics NAV and PrintVis

        ArcherPoint has partnered with PrintVis to provide expanded software solutions to the printing industry. PrintVis has providing printing solutions, embedded in Microsoft Dynamics NAV and Business Central, for more than 20 years.

        In this video, ArcherPoint’s print industry expert, Mark Angeli, demonstrates how to create a quick quote for a print job using PrintVis NAV interface. PrintVis is a printing MIS system that has been fully embedded within Microsoft Dynamics NAV and Microsoft Dynamics 365 Business Central for 20 years. This powerful ERP tool gives users the ability to quickly create, modify, print, email, and convert quotes in PrintVis/Dynamics NAV/BC.

        With its clean user interface, tailored to the print industry, plus the integration with the accounting component in Dynamics NAV, PrintVis makes it a smooth, simple task to create a quote, ensure the numbers are accurately calculated and documented, sent right to the customer from within the application, and stored in your back office system for conversion to a work order when the time comes.

         

         

        Learn more about why you should consider an ERP solution for your printing business.

        You can view this video and many other video tutorials for Microsoft Dynamics 365 Business Central and Dynamics NAV at ArcherPoint's YouTube Channel

         

        Blog Tags: 
        Viewing all 279 articles
        Browse latest View live