Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all 10032 articles
Browse latest View live

Forcing password Policy for NAV Client

$
0
0
Hello,
How can we enforce certain Password Policies like, 'user must change the password on the first logon', 'password must contains alphanumeric characters' etc? We are on Azure, so do I need to change this on AD? We are using UserName as the credential type to login to NAV.

Use Windows Credentials to consume a Web Service in ASP.NET

$
0
0
Hello Mibuso,

I have created a Codeunit Web Service which I want to use in an ASP.NET Web Site. I followed the steps from MSDN and my project builds as expected. With the integrated Visual Studio IIS Express I can consume the Web Service without any flaws.
But when I publish my Web Site and run it unser IIS 10 the authentication fails. The Web Site asks me for my credentials, which is fine, but after submitting my credentials I get an HTTP-401 'Unauthorized' error.

In the IIS Manager I enabled the Windows Login for my Site and disabled all other options.
My Web.Config file contains these lines which should be correct.
  <system.web>
    ...
    <authentication mode="Windows" />
    <identity impersonate="false" />
    ...
  </system.web>

Do you experts have any suggestions?

Kind regards.

Reversing revaluation Journal Entries

$
0
0
Hello,
The user posted the Revaluation and a positive Adjustment Entry have negative Cost amount. In order To Correct that, user posted the Negative adjustment and positive adjustment again to bring the inventory at correct Cost. But when we run the Adjust Cost, the negative Adjustment Entries that we posted after revaluation have the Cost amount as positive. Is there any way to rectify this?

Inserting into Table With code

$
0
0
Hey,
I'm trying to insert a new sales Line programmatically. However, I'm a bit lost on where should the code be written. I tried on Onvalidate trigger for No field.
and Oninsert trigger. But neither of those two worked. I used setrange, init, and some fields, but nothing happened.

Page 20 General Ledger Entries - CurrPage.SAVERECORD

$
0
0
Hi
On Page 20 General Ledger Entries on Dimension Action there is code like:

<Action49> - OnAction()
ShowDimensions;
CurrPage.SAVERECORD;

Do you have any idea what for is this SAVERECORD line? On other "Ledger Entry" pages there is only ShowDimension() line and i can't find the reason for it.

Best Regards,

Upgrade 2017- Sync Issue while doing data upgrade

$
0
0
Hi All,

we are doing data upgrade from 2016 - 2017, After the upgrade, we have deleted the Table : Object Manager objects from the Db using Force sync Mode. The Objects were deleted successfully. Now while coming any table in the object we are facing the below issue.


Microsoft Dynamics NAV Development Environment
The following SQL Server error or errors occurred when accessing the Object table:

208,"42S02",[Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'OM - Setup'.

SQL:
UPDATE [TEST2017-UPGRADE].[dbo].[Object] SET [BLOB Reference]= NULL WHERE ([Type]=1 AND [Company Name]='' AND [ID]=9183) AND ([timestamp]<=0x0000000004A95A7B)
OK


we have checked in Object Metadata Snapshot table also but, we didn't see any records for this table.

after that, we tried to import back all the objects which were deleted. System is not allowing them to import. And it is showing the same error.

please suggest..

Regards,
Teja. G

NAV 2016 Slow response time through VM

$
0
0
Client using Horizon VPN and having a pretty real issue with response time.

Are there any NAV features or specifications that I could check on for them?

It seems like the issue has more to do with networking but I'm doing what I can.


I found one blog post mentioning bad performance with NAV 2016 when the SQL and Dynamics NAV server are on separate VM hosts. Looking further into getting them both on the same host.


Migrate (Direct Posting) General Ledger Postings

$
0
0
Hey NAV people,


I have a requirement to migrate all G/L Entries (PostingDate > 010117) posted from a General Journal (Direct Posting) from one company to another. The idea is to create General Journal lines in the new company based on G/L Entries from the old one. Does anyone have any idea what would be the best way to do it? How exactly to analyze the old G/L Entries and have almost similar in the new company after posting General Journal?


Thanks a lot for your help in advance.

Cheers,

Ivan

IIF fails on simple equation

$
0
0
I have an IIF that looks like it is evaluating the full equation instead of acting on the first 'TRUE' part of the statement.

I have the following code in a cell on a report.

If their are NoTurns of Inventory, place a zero in the box. (Currently it shows ERR# when the value is zero).
And if there ARE NoTurns in Inventory, do the math calculation... which it does fine...

What am I missing??
This is the code I am using... I split it out to 4 lines just so I could visualize the layout/condition.

CODE START
=IIF( SUM(Fields!NoOfTurns.Value) = 0
, 0
, ((Sum(Fields!Item__Sales__Qty___.Value) + Sum(Fields!Item__Negative_Adjmt___Qty___.Value)) / Sum(Fields!AverageInventory.Value))
)
CODE END

I have tried using SWITCH, same issue. "=SWITCH(sum(Fields!NoOfTurns.Value) = 0, 0, sum(fields!NoOfTurns.Value > 0, *above equation*)

Shouldn't be rocket science to say "If your zero, print a zero"...

Any insight on how to fix this would be greatly appreciated... hate having a report show ERROR when I nice zero will do... :)

ADS

Download File From NAV Client, into SERVER.

$
0
0
Hello m8ts, So this is my first post and I hope I'm not duplicating it. I've tried countless times to look internet for a solution (None was fully compatible whatsoever).

I have to create a tool wich first thing it needs to do is download a GZ file from an URL, but I'm not able to find the solution in any place.

I've found 2 so far:

1 - Using ADOStream:

URLINDEX := 'SOME URL';

IF(ISCLEAR(MXH)) THEN
CREATE(MXH,FALSE,TRUE);
MXH.open('GET',URLINDEX,FALSE);
MXH.send('');

IF MXH.status <> 200 THEN BEGIN
MESSAGE('ERROR');//TEST MESSAGE
CurrReport.BREAK;
END;

FileName := MXH.getResponseHeader('Content-Disposition');

IF STRPOS(FileName,'filename=') = 0 THEN
FileName :=''
ELSE BEGIN
FileName := COPYSTR(FileName,STRPOS(FileName,'filename=') + 10);

IF ISCLEAR(ADOStream) THEN
CREATE(ADOStream,FALSE,TRUE);

ADOStream.Type := 1;
ADOStream.Open;
ADOStream.Write(MXH.responseBody);

// ---> This line is commented from the online code found, because It wouldn't pass through here It would always close the stream. The url inputted is correct, and returns a download file if opened on a Browser.
//IF ADOStream.State = 1 THEN
//ADOStream.Close;

FileName := FICHEROS + FileName;
MESSAGE(FILENAME);
//CODE BREAKS HERE, IN SAVE FILE
ADOStream.SaveToFile(FileName,2);

//CURREPORT.BREAK;
ADOStream.Close;
END;

EDIT: Variables:
MXH Automation 'Microsoft XML, v6.0'.XMLHTTP60
ADOSTREAM Automation 'Microsoft ActiveX Data Objects 2.8 Library'.Stream
FILESYSTEM Automation 'Windows Script Host Object Model'.FileSystemObject
FILENAME Text
FILEPATH Text

This will only execute "Error when writing to the file.". And as told URL and Locations are fine.


2 - Using InStream / OutStream.

URLINDEX := 'some url';

IF(ISCLEAR(MXH)) THEN
CREATE(MXH,FALSE,TRUE);
MXH.open('GET',URLINDEX,FALSE);
MXH.send();

IF MXH.status <> 200 THEN
MESSAGE('ERROR URL'); //MESSAGE FOR TESTING

FICHERO.CREATE(FICHEROS+'index_0.gz');
FICHERO.CREATEOUTSTREAM(ONS);
INS := MXH.responseStream;
COPYSTREAM(ONS,INS);
FICHERO.CLOSE;

EDIT:Variables
FICHERO File
MXH Automation 'Microsoft XML, v6.0'.XMLHTTP60
INS InStream
ONS OutStream

This won't work, he's not able to transform Automation on InStream.

Those codes, are from the internet modified (not mine) to get to do what I need.

Working under NAV 2016. Also tried a CodeUnit from a WebPage wich is suposed to download files (http://www.dynamics.is/?attachment_id=584), also unusable for our systems.

This thing is driving me so crazy I might end with 4 JaggerMeister bottles under a bridge hallucinating with nav streams.

Thank you very much,

NAV 2016 Customer Statement Report ID 10072

$
0
0
One client is pushing towards their go live date.

Their Customer Statement Report ID 10072

displays The same Company name and Ship to address for every page while the line items change to reflect the different companies.

For example assume customer x, y and z

All three customer statement reports come out with customer x Bill to and Ship to addresses while the info below accurately reflects customer x on page one and y on page 2 with z on page 3.


When I go to the layout for the report and look at the expressions in the fields that are not changing with the customer they look something like this:

=First(Fields!VAR_BillToCompany.Value, "DataSet_Result")

So I think the problem is that it's only ever going to display the First customer's info there.

How does one make these field expressions reflect the right customer?




I'm watching some videos on Visual Studio Report Designer now to get up to speed.

I'm curious if all the customer statement reports out of the box for NAV 2016 are like this? If so, why?

Customize Ribbon / Button "Add" disabled

$
0
0
Hi, I new in this Forum and I have a problem with the ribbon bar. One of the several action can not be added ??? The "add" button is disabled. What is the reason? I hope for a fast answer ;-)

NAV 2016 on Azure SQL

$
0
0
Hi,

We have been hosting NAV 2015 database on AZURE on G1 server in EAST 2 Region. NAV Service was setup on the same server - system was working quite fast.

We did technical upgraded to NAV 2016 and setup database on AZURE SQL in East 2 region. Nav Service Running on D2V2 server. We have tried different Azure SQL levels. S0 - 6-7 times slower then our old environment, S1,S2 - about 4 times slower... P1 - 3 times slower.


We tried the same set of transaction on old and new environment and measured speed on second run to avoid cashing delays. The performance on S1 tear is OK but still wander - is this normal. Should it be 3-4 time slower or we can improve.

Can i measure latency between our NAV Server and SQL - i assume that this is the problem or processor speed G1 vs D2 server. Can anybody help to find bottleneck?

Tax amount in General Ledger Entry and Realized VAT Amount

$
0
0
Dear expert

I noticed that the Tax Amount in G/L Entry table and Tax Entry table matches (Based on exchange rate when invoice is posted). However they are different from Realized VAT Amount which is based on the exchange rate when payment is made.

May I know if the Tax Amount in G/L Entry table for the original invoice, the Amount in Tax Entry table, and the realized VAT Amount in Payment G/L Entries should always be the same?

Thank you

Kelsey

NAV 2009 R2 finsql eating up CPU

$
0
0
User is on a VM

When emailing invoices finsql will spike up to use 94% of the CPU.

I thought finsql was relatively resource light.




[SOLVED] User card page - You have not been granted permission to perform current activity

$
0
0
Hello,

I read that the session table can only be accessed from NAV if you are SUPER.
(https://community.dynamics.com/nav/f/34/t/141815?pi51428=1#responses)

I wonder if something similar can be the case for accessing the user card?

My scenario is in NAV2013R2.

I go to the users list page and from there I try to access another user's card. Then I get the error:

You have not been granted permission to perform the current activity.
Page Edit - User Card must close.


The user is not SUPER, but among others it has the BASIC that includes read permission to the user table (2000000120). It is sysadmin in SQL.

I debug it and it cracks in codeunit 9801 Identity Management, in the following function:
GetWebServiceExpiryDate(UserSecurityID : GUID) ExpiryDate : DateTime
IF NOT UserAccountHelper.TryGetWebServicesKey(UserSecurityID,Key,ExpiryDate) THEN
ERROR(GETLASTERRORTEXT);

but I don't know what happens inside that TryGetWebServicesKey function.

Any advice on this?

Thanks,

Tomas

Sporadic Metadata Error when pushing action button on page

$
0
0
Hello Peepz

Sporadic Metadata Error when pushing action button on page, in this case when trying to post a warehouse shipment. When user exist page and reloads, they post it without errors:

"Metadata for page 7335 does not contain a control definition for the control with ID -208."

Ive tried recompiling the 'said' page but users still has issues.

Thanks

Error with arguements of System.Xml.Xsl.XslTransform during webrequest

$
0
0
Hi Everybody

Im trying to process a webrequest in NAV2017 with System Dotnet variables.

Im currently trying to implement this: http://forum.mibuso.com/discussion/63741/dotnet-for-webrequest - More specificly the part where i strip the response of namespace and soap.

However im having some issues with the Transform function getting the following error:
A call to System.Xml.Xsl.XslTransform.Transform failed with this message: The type of one or more arguments does not match the method's parameter type.

My RemoveNameSpace function looks like this:

Parameters:
Var	Name	DataType	Subtype	Length
No	Source	DotNet	System.Xml.XmlDocument.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'	
Yes	Destination	DotNet	System.Xml.XmlDocument.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Local variables:
Name	DataType	Subtype	Length
XslTransform	DotNet	System.Xml.Xsl.XslTransform.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'	
XmlStyleSheet	DotNet	System.Xml.XmlDocument.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'	
Writer	DotNet	System.IO.StringWriter.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'	
XsltNullArgs	DotNet	System.Xml.Xsl.XsltArgumentList.'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'	
XsltNullArgs2	DotNet	System.Xml.Xsl.XsltArgumentList.'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Code:
XslTransform := XslTransform.XslTransform;
XmlStyleSheet := XmlStyleSheet.XmlDocument;
XmlStyleSheet.InnerXml(
'<?xml version="1.0" encoding="UTF-8"?>' +
'<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">' +
'<xsl:output method="xml" encoding="UTF-8" />' +
'<xsl:template match="/">' +
'<xsl:copy>' +
'<xsl:apply-templates />' +
'</xsl:copy>' +
'</xsl:template>' +
'<xsl:template match="*">' +
'<xsl:element name="{local-name()}">' +
'<xsl:apply-templates select="@* | node()" />' +
'</xsl:element>' +
'</xsl:template>' +
'<xsl:template match="@*&quot;>' +
'<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>' +
'</xsl:template>' +
'<xsl:template match="text() | processing-instruction() | comment()">' +
'<xsl:copy />' +
'</xsl:template>' +
'</xsl:stylesheet>'
);
XslTransform.Load(XmlStyleSheet);
Writer := Writer.StringWriter;
XslTransform.Transform(Source,XsltNullArgs2,Writer);
Destination := Destination.XmlDocument;
Destination.InnerXml(Writer.ToString);

Any directions as to why this fails would be greatly appreciated?

[DotNet] Call async method from C/AL synchronously

$
0
0
Is there any way to call some DotNet async method from C/AL synchronously?

In C# it can be done like this:

Method definition:
public async Task<string> GetDataAsync(string parameter){}
Synchronous call:
string result = somObject.GetDataAsync(parameter).Result;

Unfortunately I can't translate this to C/AL. Property "Result" is not available, and without this part method is called asynchronously. Somehow I need to call this method synchronously, wait until it finishes and grab the result.

Warning event on Dynamics Nav 2017 server.

$
0
0
Hi!!!

We are now working with Microsoft Dynamics nav 2017 and in one server I have a lot of warning messages in Event viewer,
and I can not find information about it, this is the message:

Server instance: XXXXX
Category: Sql
ClientSessionId: 00000000-0000-0000-0000-000000000000
ClientActivityId: 00000000-0000-0000-0000-000000000000
ServerSessionUniqueId: 825880d5-27d3-4a4f-8f71-d50349968634
ServerActivityId: 00452ebe-3b44-4270-ac68-d81026b6af4c
EventTime: 03/08/2017 08:30:30
Message <ii>NavSqlQueryCommand is recreated due to the changed connection.</ii>
ProcessId: 26008
Tag: 00000BS
ThreadId: 253
CounterInformation:

The event viewer may contain more than 200 events every second!!!
This Navision instance is used to call web services and return data asychronously, suddenly the cpu of this server shoots to the top (100% usage) and the instance needs to be restarted.


Thanks a lot for your help.
Viewing all 10032 articles
Browse latest View live