Tuesday, March 31, 2015
Dynamics NAV 2013 - How to display a related field from another table on a page
On the CAL code for the Page, use this code to display the Barcode from the Barcode Table next to the items on my current table that only has populated Item no. and a blank field emptyBarcode with no data.
We use the emptyBarcode field as a variable to store the Barcode value we find.
Once we populate the emptyBarcode in the CAL code, the value is displayed on the page in the emptyBarcode field
//-------------------------------------------------------------------
OnAfterGetRecord()
BarcodeRec.SETCURRENTKEY("BarcodeItem No.");
BarcodesRec.SETRANGE("BarcodeItem No.","Item No.");
BarcodesRec.SETRANGE("Show for Item",TRUE);
IF BarcodesRec.FIND('-') THEN
emptyBarcode := BarcodesRec."Barcode No."
ELSE BEGIN
BarcodesRec.SETRANGE("Show for Item");
IF BarcodesRec.FIND('-') THEN
emptyBarcode := BarcodesRec."Barcode No."
ELSE
emptyBarcode := '';
END;
//------------------------------------------------------------------------
Sample of how to cycle through records and get a sum
//-------------------------------------------------------------
SL.SETRANGE("Document No.","No.");
SL.SETRANGE("Document Type","Document Type");
IF SL.FIND('-') THEN
REPEAT
Docamt:= Docamt + SL.Amount
UNTIL SL.NEXT <= 0;
We use the emptyBarcode field as a variable to store the Barcode value we find.
Once we populate the emptyBarcode in the CAL code, the value is displayed on the page in the emptyBarcode field
//-------------------------------------------------------------------
OnAfterGetRecord()
BarcodeRec.SETCURRENTKEY("BarcodeItem No.");
BarcodesRec.SETRANGE("BarcodeItem No.","Item No.");
BarcodesRec.SETRANGE("Show for Item",TRUE);
IF BarcodesRec.FIND('-') THEN
emptyBarcode := BarcodesRec."Barcode No."
ELSE BEGIN
BarcodesRec.SETRANGE("Show for Item");
IF BarcodesRec.FIND('-') THEN
emptyBarcode := BarcodesRec."Barcode No."
ELSE
emptyBarcode := '';
END;
//------------------------------------------------------------------------
Sample of how to cycle through records and get a sum
//-------------------------------------------------------------
SL.SETRANGE("Document No.","No.");
SL.SETRANGE("Document Type","Document Type");
IF SL.FIND('-') THEN
REPEAT
Docamt:= Docamt + SL.Amount
UNTIL SL.NEXT <= 0;
SL.Amount = Docamt;
SL.MODIFY;
//----------------------------------------------------------------
CAL Globals:- BarcodesRec
- Datatype: Record
- Subtype (Table): Barcodes
Saturday, March 28, 2015
How to Install NAV 2015 CU1 next to NAV 2013R2
Just run the NAV 2015 CU1 installer.
ensure you use different ports for everything, and different folders for everything.
Data director will break.
Install Data Director on another machine.
Report Writer will break
Uninstall the Report Writer for SQL 2014, and reinstall Report Writer 3 for SQL 2012
ensure you use different ports for everything, and different folders for everything.
Data director will break.
Install Data Director on another machine.
Report Writer will break
Uninstall the Report Writer for SQL 2014, and reinstall Report Writer 3 for SQL 2012
Friday, March 27, 2015
Dynamics NAV - Remove all users and allow a single login - user cannot login
USE [MyDB]
GO
delete from [dbo].[User]
delete from [dbo].[Access Control]
delete from [dbo].[User Property]
delete from [dbo].[Page Data Personalization]
delete from [dbo].[User Default Style Sheet]
delete from [dbo].[User Metadata]
delete from [dbo].[User Personalization]
Restart Service
Run as administrator if necessary
Dynamics GP 2013 - SRS Reports: not implemented with a red cross out symbol
Problem:
No matter what you try, you cannot re-deploy the SSRS reports for a specific company.
It keeps showing as a red cross out.
Related Issues:
This issue may sometimes occur on databases upgraded from previous versions
Solution
https://community.dynamics.com/gp/f/32/t/102382.aspx?pi50426=2#responses
--If TWO is the company with the problem
No matter what you try, you cannot re-deploy the SSRS reports for a specific company.
It keeps showing as a red cross out.
Related Issues:
This issue may sometimes occur on databases upgraded from previous versions
Solution
https://community.dynamics.com/gp/f/32/t/102382.aspx?pi50426=2#responses
--If TWO is the company with the problem
Select * Into DYNAMICS..sydeployedreportsbak
from DYnamics..syDeployedReports
where companyid = 'TWO'
Delete DYNAMICS..syDeployedReports
where companyid = 'TWO'
Friday, March 20, 2015
Dynamics NAV 2013 - Physical Print is different from Print Preview print
Problem:
Physical prints looks stretched, or squashed, but screen prints are fine
Physical prints look like they are printing in the wrong resolution, but screen prints are fine
Physical prints look like they are printing the wrong font, but screen prints are fine
Related issues:
Printing from Terminal Server
Printing from a Remote Session
Printing from Windows XP
This may be related to the graphics drivers.
Ensure the graphics drivers for the local machine and terminal server are updated to the correct drivers, and not the standard windows drivers.
Ensure that the client machine is on the latest service pack.
If the user uses 1024x768 and remotes in to the terminal server and prints, it will print correctly.
OR
You can leave your screen resolution the way it is, and manually change the display settings on the RDP session to force the session to display in 1024x768.
Either way, the RDP will print correctly.
Solution:
https://community.dynamics.com/nav/f/34/t/102280.aspx
Physical prints looks stretched, or squashed, but screen prints are fine
Physical prints look like they are printing in the wrong resolution, but screen prints are fine
Physical prints look like they are printing the wrong font, but screen prints are fine
Related issues:
Printing from Terminal Server
Printing from a Remote Session
Printing from Windows XP
This may be related to the graphics drivers.
Ensure the graphics drivers for the local machine and terminal server are updated to the correct drivers, and not the standard windows drivers.
Ensure that the client machine is on the latest service pack.
If the user uses 1024x768 and remotes in to the terminal server and prints, it will print correctly.
OR
You can leave your screen resolution the way it is, and manually change the display settings on the RDP session to force the session to display in 1024x768.
Either way, the RDP will print correctly.
Solution:
https://community.dynamics.com/nav/f/34/t/102280.aspx
Chrome - Cannot open or download pdf file
Related Issues:
Viewing Help PDF in Reqlogic 9
Cause:
The default Chrome pdf reader plugin is defective
Solution:
Viewing Help PDF in Reqlogic 9
Cause:
The default Chrome pdf reader plugin is defective
Solution:
- Go to chrome://plugins
- Disable the default chrome pdf reader plugin
- Attempt to open your pdf
- When prompted to open the file, click on run this time.
Other Solutions:
you can attempt to download another pdf viewer, but you will still need to disable the default one.
Subscribe to:
Posts (Atom)