Tuesday, December 22, 2015

Dynamics NAV - How to use Mergetool to merge Code

http://mergetool.com/addin_e/faq/FAQ_MERGETOOLTRAINING_WEB.htm

  • Download Mergetool and extract it
  • Look for the appropriate fob file to import to your NAV instance
    • Read the Readme in the extract to get the version number list
    • MGTx.xx.xx 7.10.fob = NAV 2013 R2
  • Create a new Database
    • Nav Admin>New>Database
  • Restore your old database into the new database
  • Import the Mergetool objects into the new database
  • Recompile all objects
  • Search for Mergetool
    • Click Versions to initialize values
  • Import all NEW text Codeunits and give them a version name
  • Import all OLD text Codeunits and give them a different version name
  • Import all BASE text Codeunits from the sample company of the final version you wish to merge into
  • Create a Blank Version MERGED to dump the final merged objects into
  • Compare the NEW and OLD
    • Click on Compare and look through the code line by line to determine what changes were made
    • Use Lines Log to see all differences
    • or Line Compare to see both files
    • This will give you an idea of how likely the files will merge correctly
  • Click merge
    • Select Old Version as BASE
    • New Version as OLD
    • Custom Version as NEW
    • New Custom as MERGED
    • Add new version = first
    • Skip if manual = true
    • Copy added new objects = true
    • Copy added custom objects = true
  • After it runs through once, set skip if manual to false, and run it again to see all the manual changes

Monday, December 21, 2015

Bixolon OPOS S-390plus POS Printer - OPOS_E_FAILURE - Print Buffer Error

Something is wrong with the memory on the printer, get a new printer, or replace the memory

Dynamics NAV - Logging, Auditing, Tracking - Change Log

To Track data changes in the system use the Change Log Entry screen

  • Search for Change Log
  • Click on Actions>Tables
    • Select tables to track
    • select fields to track
  • Tick Enable logging

Friday, December 18, 2015

Dynamics NAV - How to setup Mix & Match to print a line on the receipt when a customer purchases $100 worth of items within a specific set of groups


If a customer buys $100 worth of items across a number of specific item groups, print an extra line on the receipt indicating “Collect Free Bag from Sales Rep”
 

To achieve this, we will use the Mix and Match, with an additional benefit item (at 0 price) that has an extra print setup on it with the required message “Collect free bag”

 

·         Mix & Match Screen

o   Mix & Match Lines

§  Add all special groups, items, groups, etc. that should trigger this promotion

§  If there is no minimum quantity required, set the No. of items needed to 1

o   Triggers

§  Enter the Amount to Trigger (in this example, you would enter 100)

o   Additional Benefits

§  Add a 0 price/cost item with an Extra Print setup with the required message


Thursday, December 17, 2015

Dynamics GP -Lexmark Printers print strange fonts - line sizes are half sized, lines print one on top the other

The Lexmark driver may be causing problems
  • There is a mode to switch the Lexmark to emulate Epson behaviour
  • Or you can install and use a Generic Text driver for the printer

Dynamics NAV - LS REtail - Data Director - Enable Logging



How to activate File Debug Logging



1. Open the Data Director Configuration Tool as administrator.

2. Go to the Debugging tab

3. Select the server and press Get Config button.

4. Set the Startup level at 15 for both Router and Database.

5. Press the Save Config and restart the Data Director

The log files will appear under the Log folder in the Data Folder (see the Base Config tab)

For my setup, the logs will be in C:\ProgramData\LS Retail\Data Director\Log and the data files will be in C:\ProgramData\LS Retail\Data Director\Work


Wednesday, December 16, 2015

Receipt Printer - How to add a logo to receipt printer using NV Image tool: Bixolon SRP 350 plus

  • http://www.titanpos.co.za/downloads/Utilities/NV%20Image%20Tool%20V3.1.6(Eng)/NV%20Manual%20english_Rev_2_05.pdf
  • Run Bixolon OPOS Setup Utility
    • Select Printer
    • Change ports and checkhealth until you find the port the printer is connected to
    • Return to main menu
  • Select printer
    • Click NV Image
    • Click NV Image Tool
    • Click Port Setting
      • Select Printer Model SRP-350plus
      • Select Interface - select port
      • Click Download
      • Click Download Start
        • This will clear all images from the printer, and upload the selected image
        • Click print to print a sample
          • Tick Add Header
        • Test the printer

Monday, December 14, 2015

Dynamics NAV - How to fix an existing item cost that is currently incorrect - Wrong Costs - Cost Revaluation

  • Method 1 - The Proper Way - Only works if cost is coming from invoicing
    • Do return transactions to cancel the original invoices
    • Re-receive at the correct cost at the original date
  • Method 2 - Using a Revaluation Journal
    • Run Adjust Costs against the item you wish to revalue to ensure no outstanding adjust cost jobs exist
    • Ensure that the posting periods are open
    • Open Revaluation Journal Entry window
      • Click Calculate Inventory Value
      • Enter the date the costing error happened
      • Enter filter for item no.
        • If using average costing, calculate per item (not item ledger entry), location, variant
      • Enter any filters as required
      • Leave all other fields blank, click ok
      • System will populate the revaluation journal with all value entries
      • Change the Unit Cost (Revalued) column to the value you want
      • Post the revaluation entry
      • Run the adjust cost
      • This will also resolve any sales at historical incorrect costs.
  • Method 3 - Reset Stock (This is your only option if using average costing)
    • Adjust all stock out as at yesterday, or some previous date period that will allow you to adjust in new stock using a different date
      • We do not want to do the adjust out and adjust in on the same date or it will cause the average cost to average incorrectly
      • Example 
        • Change posting dates to 30-Jan-20
          • Whse. Phys. Inv. journal>Set to 0>Register (Ignore this step if not using warehousing)
          • Physical Inventory Journal>Set to 0, post
        • Change posting dates to 31-Jan-20
          • Whse. Phys. Inv. journal>Set to Stock amount>Register (Ignore this step if not using warehousing)
          • Physical Inventory Journal>Set to stock amount>Set new Cost>, post
        • This way it correctly calculates a new average cost on 31-Jan-20

Friday, December 11, 2015

Dynamics NAV - User Permissions View - User Access List

View showing all users and all assigned permission groups

SELECT dbo.[Access Control].[Company Name], dbo.[User].[User Name], dbo.[Access Control].[Role ID]

FROM dbo.[Access Control] INNER JOIN

dbo.[User] ON dbo.[Access Control].[User Security ID] = dbo.[User].[User Security ID]

Thursday, December 10, 2015

Dynamics NAV - LS Retail - Data Director - Jobs stuck in "PreProcessed"

There is some large job that is stuck in Data Director being processed, and sticking the queue.

Resolution:
Restart the Data Director Service.
You will lose any jobs that are currently in the queue. Remember to reset the replication counters and re-send them.
  • Launch DD configuration Tool
  • Select Head Office
  • Click Stop DD
  • Click Start DD

Dynamics NAV - LS Retail - Scheduler Job Record Filter

  • Edit Subjob>Navigate>From Table Filters
    • Use Filter Type "Filter" its the only one that works
    • It will insert this value directly into the SQL query
    • It can only hold 12 characters
  • Eg. Filter1 value to filter a date should be
  • ='20160120'
  • If using the sql filter
    • Also try '2016-6-20' because the field only accepts 12 characters in the filter
Example - How to set the filter to the current date for a subjob using CAL code

SJFilt."Value 1" := '='+ '''' +  FORMAT(DATE2DMY(TODAY,3),4)+
CONVERTSTR(FORMAT(DATE2DMY(TODAY,2),2),' ','0')+ CONVERTSTR(FORMAT(DATE2DMY(TODAY,1),2),' ','0') + ''''


SJFilt."Value 1" := '='+ '''' + FORMAT(DATE2DMY(CALCDATE('<1D>',TODAY),3),4)+ CONVERTSTR(FORMAT(DATE2DMY(CALCDATE('<1D>',TODAY),2),2),' ','0')+ CONVERTSTR(FORMAT(DATE2DMY(CALCDATE('<1D>',TODAY),1),2) ,' ','0')+ '''' ;

Example2 - How to set the filter to the current date for a subjob using sql

update [Cronus].[dbo].[Cronus$Scheduler Subjob Filter] set [Value 1] = '>'+'''' + cast(year(getdate()) as varchar) +  right('0' + cast(month(getdate()) as varchar),2) +  right('0'+case when day(getdate()) = 1 then cast(day(getdate()) as varchar) else cast(day(getdate())-1 as varchar) end,2) + ''''  FROM [Cronus].[dbo].[Cronus$Scheduler Subjob Filter] where [Subjob ID] = 'ITEM_DATE_FILTER'

Wednesday, December 9, 2015

Dynamics NAV - LS Retail - POS Replication - How to resend the last x action updates

Reduce the replication counter on the corresponding replication counter line on the job header for the number of actions you wish to resend
You can check the Preaction Log or the Preaction list to see what jobs have already gone through, or are pending to go through.

Dynamics NAV 2013 R2 - How to resolve CONSISTENCY error

  • Import this codeunit (save as text and import and compile)
---------------------------------------------------------------------------------------------


OBJECT Codeunit 50089 Single Instance CU-GL Consist
{
  OBJECT-PROPERTIES
  {
    Date=10/29/15;
    Time=[ 1:15:17 PM];
    Modified=Yes;
    Version List=MOD01;
  }
  PROPERTIES
  {
    Permissions=TableData 17=rimd;
    SingleInstance=Yes;
    OnRun=BEGIN
            IF NOT StoreToTemp THEN BEGIN
              StoreToTemp := TRUE;
            END ELSE
              PAGE.RUN(0,TempGLEntry);
          END;
  }
  CODE
  {
    VAR
      TempGLEntry@1000000000 : TEMPORARY Record 17;
      StoreToTemp@1000000001 : Boolean;
    PROCEDURE InsertGL@1000000000(GLEntry@1000000000 : Record 17);
    BEGIN
      IF StoreToTemp THEN BEGIN
        TempGLEntry := GLEntry;
        IF NOT TempGLEntry.INSERT THEN BEGIN
           TempGLEntry.DELETEALL;
           TempGLEntry.INSERT;
       END;
      END;
    END;
    BEGIN
    {
      Used for debugging GL Consistency errors.
      See CU 12
      Steps:
      1. Run CU and it will start in memory
      2. Run any posting that generates a consistency error
      3. Run CU again and the GL that would have posted will be shown
    }
    END.
  }
}


----------------------------------------------------------------------------------------------
  • Modify C12 - FinishPosting
    • Look for these lines 
    • Insert the code between //MOD

    • GlobalGLEntry.INSERT;
      //MOD
      SingleCU.InsertGL(GlobalGLEntry);
      //MOD
        UNTIL TempGLEntryBuf.NEXT = 0;
       
  • Add Global Variable SingleCU = Codeunit, Single Instance CU-GL Consist
  • Run CU and it will start in memory
  • Run any posting that generates a consistency error
  • Run CU again and the GL that would have posted will be shown
  • Copy and paste the results to Excel
  • Sort by account
  • Subtotal by account
  • Manually Sum totals for all Sales
  • Manually Sum totals for all Receipts
  • Compare the totals and work through the figures to find where the numbers do not match
  • General problem areas
    • Rounding causes minor differences and no rounding account is setup, so rounding differences are lost, causing inconsistencies
    • VAT causes rounding and above problem
    • Discounts cause rounding and above problem
    • Currency Exchange rates cause the above problem
    • Records are missing from the Sales_Trans_Entry table if dealing with statements
    • Total Payments do not match Total receipts
  • To resolve the issue
    • Determine the root cause of the differences to prevent future errors
    • Cancel, reverse, void or redo the transaction if possible
    • LAST RESORT: You may need to modify the Sales_Trans_Entry table record values to force a match to allow the current transaction to post if dealing with statements

Wednesday, December 2, 2015

Dynamics NAV - Change VAT %

  • When changing VAT, the problem of re-calculating Unit Price, and Unit Price Including VAT occurs
    • The Unit Price or Unit Price including VAT will not change unless the price is actually changed manually, or in a package
  • To resolve this issue
    • Stop Nav Scheduler to prevent changes from going to terminals
    • Export Current Items and Sales Prices
      • Export all Item no,, VAT Prod Posting Group, Unit Prices, Unit Price including VAT to excel package template
        • Split this into 2 templates, 
          • one for items with new prices - IC
          • one for items where prices are not changing - INC
      • Export all Sales Prices with no ending date to excel package template
        • Split this into 2 templates, 
          • one for items with new prices - PC
          • one for items where prices are not changing - PNC
    • Change VAT % (see methods below)
    • Import Item updates
      • For the INC List, set all item card prices including vat to 0
        • Import and apply this package
        • Then set all prices to the new selling price including VAT
        • Import and apply this package
          • This is to get NAV to reverse calculate the correct Unit Price without VAT
      • For the IC list, just import and apply
    • End all current Sales Prices
      • This is done as a precaution to ensure no old prices are missed
      • Run a SQL update to put an ending date on all sales prices with no ending date
      • update [mytable] set [Ending Date] = '2016-01-31' where [Ending Date] < 0
    • Import all new Sales Prices
      • For the PC List
        • Change the Starting Dates
        • Update PC template with new sales prices
        • Import and apply
      • For the PNC list
        • Change the starting dates
        • Import and apply
    • Re-Export all Items and Sales prices and compare to import lists to confirm changes went in correctly
      • In some instances, the unit prices on the item cards are incorrectly updated after importing the sales prices
    • Configure any custom jobs to push changes to terminals
    • Start NAV scheduler to push all changes to terminals
------------------------------------------------------------------------------------------------------
VAT CHANGE METHODS
  • Method1 - Change the existing rate and only affect new transactions moving forward
    • http://www.tvisiontech.co.uk/news_5.html
    • Search for VAT Posting Setup
      • Change current VAT %
      • Create new VAT Codes for the old rate to handle old transactions being entered before the vat change date. (eg. VATOLD)
      • Manually select the new vat code (VATOLD) if you need to handle transactions for the old vat %
    • Check and adjust item prices, including VAT and sales prices.
      • Use the batch job Adjust Item Costs/Prices.
    • Push all changes to terminals
      • Table VAT Posting Setup 325 to all terminals
      • Table VAT Code 99001560 to all terminals
      • Item
      • Sales Prices
  • Method 2 - Create a new Rate and only affect new transactions going forward
    • All existing transactions containing VAT should be posted
    • New VAT Posting Group should be created with new VAT% (keep the old existing ones)
    • New VAT Posting Setups should be created with new VAT% (keep the old existing ones)
    • New VAT Code should be created with new VAT % (keep the old existing ones)
    • Update all VAT Product Posting Groups on Customers, Vendors, Items, GL
    • Push all changes to terminals
      • Table VAT Posting Setup 325 to all terminals
      • Table VAT Code 99001560 to all terminals
      • Customers
      • Vendors
      • Items
      • GL Accounts
    • Only new transactions going forward will have the new VAT %

  • Method 3 - Change all unposted transactions, and all new transactions going forward
    • Create new VAT Codes
    • Create new VAT Posting Groups
    • Search for VAT Rate Change
    • Setup VAT Prod Posting Group conversion to define the old VAT code and the new VAT code to replace it with
  • Setup the VAT Rate Change Setup




  • Test the VAT conversion

    • Clear the VAT Rate change Tool Completed Checkbox
    • Clear the Perform Conversion Checkbox
      • Once this is cleared, running the convert function will only simulate a conversion
      • The actual conversion will not happen
    • Review the VAT Change Log Entry




  • Print all VAT reports before conversion
  • Perform the VAT Conversion

    • Clear the VAT Rate change Tool Completed Checkbox
    • Mark the Perform Conversion Checkbox
    • Review the VAT Change Log entry
    • Review sample data




  • Print all VAT reports after conversion
  • Push all changes to terminals

    • Push the values for Table VAT Posting Setup 325 to all terminals
    • Push the values for Table VAT Code 99001560 to all terminals




  • These changes will affect current unposted transactions, and new transactions going forward
  • Historical transactions will remain with the VAT% they had when they were posted