Friday, October 11, 2019

Dynamics GP - The stored procedure create SQLTmpTable returned the following results: DBMS:2627

Issue:
Users experience this issue for a single customer or vendor when opening the inquiry screen

Cause:
There are duplicate records across your work and posted tables.

Resolution:
Review all of the connected tables and records for the specific customer/vendor that is giving this issue

Refer to this article for duplicate checking scripts
http://cowmasterscorner.blogspot.com/2018/02/dynamics-gp-error-occurred-when.html

LS NAV - Only allow Managers to process certain member club cards


o   T99009000 - Add Req. Mgr. Login Boolean
o   P99009000 - Add Req. Mgr. Login Boolean
o   P99009001 - Add Req. Mgr. Login Boolean
o   C99001570
§  InputMemberCard> MemberClub_g
·        If MgrKey=False, then Errorbeep
o   X10032992
§  MemberClub- Add field for Req. Mgr Login
o   T99009643
§  GetMemberInfoForPos
§  Click Publisher & subscriber to reload web requests
·        Updates Request and Response with Req. Mgr Login field

NAV CAL - Boolean Yes / No vs True / False

Boolean type can accept Yes/No and True/False values.
However, if Yes/No is used, it must be explicitly called.

Eg.

This Works
----------------------------------
BooleanTest := True

If BooleanTest THEN
 Message ('true!');
----------------------------------

This does not work
----------------------------------
BooleanTest := Yes

If BooleanTest THEN
 Message ('true!');
-----------------------------------

This works
----------------------------------
BooleanTest := Yes

If BooleanTest = TRUE THEN
 Message ('true!');
-----------------------------------

Wednesday, October 9, 2019

Dynamics NAV - How to update an AL extension

https://cloudblogs.microsoft.com/dynamics365/no-audience/2018/01/16/generate-symbols-in-a-modern-development-environment-with-microsoft-dynamics-nav-2018/

Ensure the following are ticked on your instance
  •  Development>Enable Developer Service Endpoint
  • Odata Services>Enable Odata Services
Run This in CMD

  • Open the CMD in administrator mode. Navigate to the Role Tailored Client folder (CD Path to folder). Run the following command
  • cd 'C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\140\RoleTailored Client'
  • .\finsql.exe Command=generatesymbolreference, Database=MYDB, ServerName=[Sql server/Instance]
  • Go to Task Manager>Details to see if it's running. It silent, and takes about 15 minutes.
  • If you get any errors with the next scripts, the finsql is still running
Run this in Powershell
  • Uninstall-NAVApp -ServerInstance YourDynamicsNAVServer -Name 'App Name'
  • UnPublish-NAVApp -ServerInstance YourDynamicsNAVServer -Name 'App Name'
  • Publish-NAVApp -ServerInstance YourDynamicsNAVServer -Path ".\MyExtension.app" -SkipVerification
  • Sync-NAVApp -ServerInstance YourDynamicsNAVServer -Name 'App Name'
  • Install-NAVApp -ServerInstance YourDynamicsNAVServer -Name 'App Name'

example


Publish-NAVApp -ServerInstance UAT -Path 'C:\Mods\Module_1.0.0.0\Module_1.0.0.0.app' -SkipVerification



Sync-NAVApp -ServerInstance UAT -Name ‘Module’



Install-NAVApp -ServerInstance UAT -Name ‘Module’


Dynamics GP - Item Lot Quantity SQL View

IV00300 - Item Lot quantities
IV00301 - Lot Attributes


/****** Object:  View [dbo].[BI_ItemLotQty]    Script Date: 09/10/2019 12:01:05 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER VIEW [dbo].[BI_ItemLotQty]
AS
SELECT     dbo.IV00300.ITEMNMBR, dbo.IV00300.LOCNCODE, SUM(dbo.IV00300.QTYRECVD - dbo.IV00300.QTYSOLD) AS LotQtyOnHnd, SUM(dbo.IV00300.ATYALLOC) AS LotQtyAllocated, dbo.IV00101.ITMTRKOP,
                  SUM(dbo.IV00300.QTYRECVD - dbo.IV00300.QTYSOLD - dbo.IV00300.ATYALLOC) AS LotQtyAvlbl, dbo.IV00101.USCATVLS_2 AS Category, dbo.IV00101.CURRCOST, SUM(dbo.IV00300.QTYRECVD - dbo.IV00300.QTYSOLD * dbo.IV00101.CURRCOST) AS CostOnHand,
                  dbo.IV00101.ITEMDESC, CASE WHEN iv00101.itmclscd LIKE '%fg%' THEN 'Finished Goods' ELSE 'Other' END AS FGOTH, dbo.IV00301.LOTNUMBR, dbo.IV00301.LOTATRB1, dbo.IV00301.LOTATRB2, dbo.IV00301.LOTATRB3, dbo.IV00301.LOTATRB4 AS BestBefore,
                  dbo.IV00301.LOTATRB5, dbo.IV00300.DATERECD AS Received, dbo.IV00300.MFGDATE AS Manufactured, dbo.IV00300.EXPNDATE AS Expiry
FROM        dbo.IV00101 INNER JOIN
                  dbo.IV00300 ON dbo.IV00101.ITEMNMBR = dbo.IV00300.ITEMNMBR LEFT OUTER JOIN
                  dbo.IV00301 ON dbo.IV00300.LOTNUMBR = dbo.IV00301.LOTNUMBR AND dbo.IV00300.ITEMNMBR = dbo.IV00301.ITEMNMBR
GROUP BY dbo.IV00300.ITEMNMBR, dbo.IV00300.LOCNCODE, dbo.IV00101.ITMTRKOP, dbo.IV00101.USCATVLS_2, dbo.IV00101.CURRCOST, dbo.IV00101.ITEMDESC, dbo.IV00301.LOTNUMBR, dbo.IV00301.LOTATRB1, dbo.IV00301.LOTATRB2, dbo.IV00301.LOTATRB3,
                  dbo.IV00301.LOTATRB4, dbo.IV00301.LOTATRB5, dbo.IV00300.DATERECD, dbo.IV00300.MFGDATE, dbo.IV00300.EXPNDATE, CASE WHEN iv00101.itmclscd LIKE '%fg%' THEN 'Finished Goods' ELSE 'Other' END
HAVING     (dbo.IV00101.ITMTRKOP = 3) AND (dbo.IV00300.LOCNCODE > '') AND (SUM(dbo.IV00300.QTYRECVD - dbo.IV00300.QTYSOLD) <> 0)

GO