Monday, August 24, 2020

NAV/BC - How to disable the "Do you want to delete the sales line and all tracking lines" prompt when deleting sales order lines with lot numbers

  •  P46-OndeleteRecord

  • C99000832 Sales Line-Reserve
    • Rem out the confirm prompt
  • For Item Journals
    • c99000845
      • DeleteItemTrackingConfirm
        • Rem the first line so it always exits true
        • IF NOT ItemTrackingExist(CalcReservEntry2) THEN
        •   EXIT(TRUE);

Friday, August 21, 2020

NAV/BC - Record is locked by another user - What causes locks and how to avoid them


  • The purpose of locking is to maintain data integrity during the execution of a function, and to minimize blocking (where two functions try to change the same data at the same time)
  • What causes locking?
    • Automatic
      • Whenever a table is being written to (Insert, modify delete), it is automatically locked
        • Depending on the filter, an entire range will be locked to ensure the filter returns accurate data (SETFILTER may lock a range, GET locks a single record)
        • Records before and after a specific range or record will also get locked
        • Using Findlast locks the last record and prevents insertion of new records
      • During a large read or application of filters that return many records 
    • Intentional
      • Locktable function will lock any records/tables accessed after the locktable function is called until the function is finished
  • What removes locking?
    • After a Commit function
    • After a CAL module is exited
    • After a read function completes
  • Guidelines to prevent locking scenarios
    • Do not leave long write commands in loop limbo, Commit often enough to prevent locking.
    • Use Setcurrentkey to change sorting options so that you are not locking records close to records users may be actively using
    • Define your own locks to prevent the system from locking in an improper order

Thursday, August 20, 2020

NAV / BC - How to setup US Tax of Multiple taxes to apply to a single sales transaction

 Example: Sale of 100 requires 2% GST and 15% VAT = 100 + 2 + 15

Both need to be tracked and reported in separate tax statements.


Solution:

  • Use NA Localization
  • General Ledger Setup
    • Vat In Use = False
  • Tax Posting Setup
    • No entries, blank combination must be set to vat calculation type "Sales Tax"
    • Products must have blank tax product posting group
    • Customers must have blank tax bus. posting group
  • Setup Tax Areas
    • Zone1
    • Setup and assign Jurisdiction codes and report Jurisdiction to allow Collected Sales Tax report to work
      • GST
      • VAT
      • Setup and assign Tax group Codes to each jurisdiction
        • MFGGOODS (GST and VAT)
        • SLSGOODS (Vat Only)
          • Set Tax details on each combination
            • set Max Amt Qty to 0
            • Set tax above max to 15 and 2 respectively
  • On Company
    • Set Tax Area code
  • On Location
    • Set Tax Area Code
  • On Item
    • Set Tax Group code
  • On customer
    • Set Tax Liable
    • Assign Tax area code
  • Create Sales Order>See tax calculate in total
  • View Tax Entries for summary tax information by transaction
  • Run Sales Taxes Collected Report to view taxes


Wednesday, August 12, 2020

LS Retail - How to setup Store and Customer -Specific Pricing

·        Store Price Groups 

o   Add stores to a store price group 

·        Customer Price Groups 

o   Add Store Price Groups 

o   Add Item Sales Prices 

·        Retail Customer 

o   Assigned to a specific Customer Price Group 

·        Sales Price Amounts 

o   Based on Customer and Item 

o   OR Based on Customer Price Group and Item 

 

·        Customer Discount Group  

o   Assigned to a specific Customer 

·        Item Discount Group 

o   Assigned to a specific Item  

·        Customer Discount Amounts 

o   Based on Customer Discount Group and a specific Item 

o   Or Based on Customer Discount Group and a specific item discount group 

 

·        Pricing Priority 

o   https://help.lscentral.lsretail.com/Content/How%20Tos%20Created%20by%20Support/How%20to%20Work%20with%20Price%20Priority.htm?Highlight=sales%20price%20priority 

o   LS Retail will try to get the lowest price based on all active pricing and discount rules