Thursday, December 27, 2018

LS NAV - OMNI - How to set the default customer for Ecommerce transactions


  • Store Setup>Omni>Web Store Customer Number
  • DEV>WI Setup Table>WI In use = yes, Web Store Code=store code,  Web Store Customer No. = default cus no

Friday, December 21, 2018

LS NAV - Create an Out of Stock Report


  • Custom Report in NAV
    • Datasets
      • T27 Item
        • T10012209 Replen. Out of Stock Log (Dataitemlink on No.)
    • Filters
      • Custom Filters for StartDate and EndDate
    • Layout
      • Group by Item
      • Group by Location
        • Total Days out of stock
        • Total % of time out of stock for date range selected
        • Total Count of Times item went out of stock in period
    • Globals
      • StartDate Date 
      • EndDate Date 
      • CalcDaysOOS Integer 
      • CalcDateOut Date 
      • DaysInRange Integer 
      • PCDaysOOS Decimal
    • CAL
Documentation()

OnInitReport()

OnPreReport()
DaysInRange := EndDate - StartDate;

OnPostReport()

Item - OnPreDataItem()

Item - OnAfterGetRecord()

Item - OnPostDataItem()

Replen. Out of Stock Log - OnPreDataItem()

Replen. Out of Stock Log - OnAfterGetRecord()
CalcDaysOOS := 0;

IF "Date Out of Stock" < StartDate THEN BEGIN
  CalcDateOut := StartDate;
END ELSE BEGIN
  CalcDateOut := "Date Out of Stock";
END;


IF "Date In Stock" <= DMY2DATE(1,1,1900) THEN BEGIN
  CalcDaysOOS := EndDate - CalcDateOut;
END ELSE BEGIN
  CalcDaysOOS := "No. of Days Out"; 
END;

PCDaysOOS := CalcDaysOOS / DaysInRange;

Replen. Out of Stock Log - OnPostDataItem()

Thursday, December 20, 2018

GP Web Client - Smartlist

Administration-Reports
Add site to trusted sites to export to excel

Dynamics NAV - Add Revision No. to Purchase Order


  • Use the "No. of Archived Versions" in the T38 Purchase Header
    • Add field to page header in R405 Order 
  • Ensure you enable quote and order archiving in the Purchase & Payables Setup
  • Advise users to archive whenever they make major changes to increment the revision number


GP 2016 Web Client - Mods do not display, or throw errors in Web Client

Ensure gp web server has all customizations installed and is pointing to shared dictionaries.





https://winthropdc.wordpress.com/2015/04/08/how-to-enable-visual-studio-tools-customisations-for-the-web-client/

Your VB code needs to explicitly state the mod is available in the web client

Enable Mod in VB

<SupportedDexPlatforms(DexPlatforms.DesktopClient Or DexPlatforms.WebClient)>
Public Class GPAddIn
    Implements IDexterityAddIn
    ' IDexterityAddIn interface
    Sub Initialize() Implements IDexterityAddIn.Initialize
    End Sub
End Class

Wednesday, December 19, 2018

SSRS - After modifying a GP SSRS Report, you get an error about xmlns and Semanticquery

When reconnecting the data sources, be sure that you reconnect SemanticQuery sources to the Data Model Sources, and not regular Data Sources.


  • Data Model Sources
    • Stored in GP/Reportserver/ReportModels/TWO
  • Regular Data Sources
    • Stored in GP/Reportserver/Data Sources

If you connect them badly, none of the Sematicqueries will run.

Tuesday, December 18, 2018

NAV - CAL Get Currency Exchange Rates

T330 Currency Exchange Rate.GetLastestExchangeRate
T330 Currency Exchange Rate.GetCurrentcurrencyFactor
T330 Currency Exchange Rate.POSExchangeLCYToFCY

LS NAV - CAL Popup Message Box on POS

C99001570 POS Transaction.POSMessage

PosMessage(Txt);

LS NAV - Infocode Popup Codeunit

C99001570 Pos Transaction. InfoKeyPressed
Parameter is passed in

You can add code to here to have a specific infocode behave in a specific way
Value from Keypad input goes to global CurrInput
C99008905 POS Infocode Utility
Line 995
InfoEntry.Infocode := InfoCodeRec.Code;
InfoEntry.Information := Input;

From here you can add code to trigger based on the infocode values

LS NAV - Modify POS Screen to create button to pre-calculate loyalty value of input

Issue: If a customer wants to know how many points it will take to cover a bill, there is no way to determine that without attempting to tender with points, and even so, you cannot define the amount of points to pay with, only the dollar value, and the system then decides how many points it will use based on the exchange rate.
Users have to manually grab a calculator and work out how much money 50 points are worth, and then customers have to juggle items on the bill to get it to fall within that value.

Solution:
Add button to prompt for point input - display dollar output
Add button to prompt for dollar input - display point output


  • Create infocode LOYTOAMT
    • Enter prompt "Cash Amount->Pts"
    • Numeric Input
    • Number Pad
  • Create Button command INFO_K, parameter LOYTOAMT
  • C99008905
    • Create LOYTOAMT function
      • PointsDec Decimal
      • PT Codeunit POS Transaction
      • Txt Text
      • ER Record Currency Exchange Rate
LOYTOAMT(Points : Text) : Decimal
EVALUATE(PointsDec,Points);
Txt :=FORMAT(ER.POSExchangeLCYToFCY(TODAY,'EMP_POINTS',PointsDec));
    PT.PosMessage(Txt);

    • At end of IsInputOk

IF InfoEntry.Infocode = 'LOYTOAMT' THEN BEGIN
LOYTOAMT(InfoEntry.Information);
END;


Windows - How to open Steps Recorder


  • Windows + R to open run box
  • type in psr  (Problem steps recorder)

Monday, December 17, 2018

Dynamics GP - Extended Pricing vs Standard Pricing


  • Extended Pricing
    • Prices are centered around customers
    • A base price sheet is applied to all customers at the first level
    • A customer can get specific pricing on items in a hierarchy model with customer specific pricing taking precedence over base pricing
    • Any customer prices not defined automatically fall to base pricing
  • Standard Pricing
    • Prices are centered around items
    • Item prices are set on a price sheet as Retail Pricing, Wholesale Pricing, Staff Pricing, etc.
    • Customers can only belong to a single price sheet, and will only get prices on that price sheet
    • If an item is not on a price sheet, when a customer attempts to buy that item, it will either prevent the sale or sell at 0 price, or allow a user to set the price depending on your setup

Sunday, December 9, 2018

NAV CAL - Locking and Blocking Notes


  • Problem:
    • Locking and Blocking occurs whenever you use a FIND('-') with a REPEAT
    • It will lock the table while it runs through the repeat loops
  • Solution:
    • Use For .. DO instead
    • Use FindFirst or Findlast instead of Find('-') when dealing with large recordsets where you only need the first record
    • Build the logic in a way that resets the filter on the table for each pass and runs the routine without needing to use the REPEAT functions
      • The slightly slower performance is worth it to eliminate the locking issue
    • This method will allow you to do SQL selects while your code is running on the table, and will also allow other users to complete their tasks without locking up the tables

Monday, December 3, 2018

Dynamics NAV - Drop Ship Process - How to complete or credit a drop ship cycle


  1. https://www.youtube.com/watch?v=KtFTbTwnf64
  2. Create Sales Order
    1. On Line, enter "Drop Ship" as Purchasing Code
  3. Create Purchase Order Manually
    1. Under Shipping and Payment, Change Ship-to : Customer Address
    2. Select Customer
    3. Prepare>Drop Shipment>Get Sales Order
    4. Select Lines
  4. OR Use Requisition Worksheet to generate PO's
  5. Receive PO
    1. Post PO>Receive (Will receive and ship to Sales Order)
  6. Post Sales Order - Ship and Invoice
    1. Navigate to Sales Invoice
    2. Post and Print sales Invoice
  7. Post PO>Invoice 

To reverse a transaction, you must complete the cycle, then do a credit memo on the sales side, and on the purchase side to cancel the invoices.

Sometimes, an invoice may not complete automatically.
To complete it manually:
  • Search for Sales Invoices
  • Create a new Invoice
  • Select Customer
  • Then go to Lines>Functions>Get Shipment Lines
  • Choose Shipment
  • Check the info..make sure it’s all correct
  • Post
  • That should complete the cycle, and now you can pass your credit if you need to cancel the value.

Saturday, December 1, 2018

Dynamics NAV - Modify R5808 Item Age Composition to use original receipt dates even if transferred


  • T339 Item Application Entry
    • Add flowfield for Item No from item ledger entry no
      • Lookup("Item Ledger Entry"."Item No." WHERE (Entry No.=FIELD(Item Ledger Entry No.)))
    • Add date field for OrigRctDate
  • Create routine to update OrigRctDate 
    • Purchase Receipts
      • Filter where Outbound Item Entry = 0 and Transaction Type = 'Purchase'
      • For each entry, copy the original receipt date on all subsequent inbound entries
      • Follow the chain through to the end, and copy the same orig rct date for all
    • All Other Trx
      • Scan through each record in the Item Application entry with a blank OrigRctDate
      • Lookup the inbound entry OrigRctDate, apply it to this record
      • Repeat for all records
    • Postive Adjustments and other positive unknown transactions
      • Find the oldest open purchase rct trx, use the OrigRctDate form there
  • Modify the R5808 Item Age Composition Value
    • Add Routine to calculate InvQty by using Item Application Entry OrigRctDates, but use Item Ledger entry Remaining Quantities
    • Update ItemLedgerEntry Onaftergetrecord to actually run For 1 to 5 for all array variables