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

Page error.

$
0
0
Is there a way to clear the error on a page.
I have code on a page that will throw the error message when a person tries to ship too much product.
Simple calculation... works perfect.

But when they correct the entry, the error ribbon still retains the error even though you can continue on with the entry.
Just an annoying eye sore to have it maintained on the page.

I have tried CLEARLASTERROR and ERROR(' ') *this clears the verbiage, but still retains the yellow error bar.

Refresh on the page does nothing...

For me to get rid of the error on the page, I have to close the page and reopen it for it to be gone.

ke5ac4gnnyw0.png

Any help or thoughts to try??

I can't evaluate a DateTime value

$
0
0
Hi,

I'm trying to evaluate a value, however I am getting the following error:

The value "2021-02-16T09:26:36.953" can't be evaluated into type DateTime.

With what method can I solve the problem?

Want to create sales order for each line from sales quote

$
0
0
Hi All,

I have created a sales quote with multiple lines added. Here i want to to create a different sales order for each line of sales quote.

Explanation:

I have a Sales Quote with two lines(X and Y). While i am clicking the 'make order' button in SQ page, It should create two different Sales orders one with item line X and another sales order with Item line Y.

Please help me with your ideas / Code snippets.

Thanks in Advance,
Jacob A.



Import attachment in Web Client is not working

$
0
0
Hi All,

[Version: NAV 2016]

In a customized page, I newly kept an feature for Importing, Exporting and Deleting an attachment. I can able to Import/Export/Delete without any issues in Windows client. When I try to import an attachment from web client, immediately the web page gets closed and am getting below error:

An error has occurred

A server error has occurred, and the content cannot be displayed. Refresh the page or open a new browser window.

Restart ->


In Customized Table: Attachment Table, I wrote below function for Import.

Local variable of ImportAttachment function:
Parameter: RecIDToImport (RecordID)
Variable: AttachRecordRef (RecordRef)

[b]ImportAttachment(RecIDToImport : RecordID)[/b]

INIT;
"Line No." := "Line No." + 10000;
"Primary Key" := RecIDToImport;
Filename := FileManagement.BLOBImportWithFilter(TempBlob,Text002,'','*.*|','*.*');
IF Filename = '' THEN
  EXIT;
Attachment := TempBlob.Blob;
"Name of the File" := FileManagement.GetFileName(Filename);
Extension := '.' + FileManagement.GetExtension(Filename);
INSERT;

IF Attachment.HASVALUE THEN
  MESSAGE(Text005,Filename);

I wrote below code in page OnAction..

Global variables:
AttachmentRecLineNo (Integer)
AttachmentRecNameofFile (Text)
AttachMgmt2 (Record) Attachment Table

AttachmentRecRef.OPEN(DATABASE::"Purch. Request Header");
AttachmentRecRef.SETPOSITION(GETPOSITION);
AttachmentRecID := AttachmentRecRef.RECORDID;
AttachmentRecRef.CLOSE;
AttachmentManagement.ImportAttachment(AttachmentRecID);
AttachmentManagement."Document No." := "No.";
AttachmentManagement.MODIFY;

What is missing and can anybody let me know how to sort it out?

Thanks in advance,
Aarvi.

Debugger very slow

$
0
0
Hello,

i just installed my machine and i still have a great problem. If i debug any Nav Version (2013,2013R2,2015) the debugger reacts very slow. Slow means i click and get a responds in 30 seconds or more.

Actually i have just installed NAV 2013 R2 and NAV 2015 and SQL Server 2012.

The Service runs on a networkmachine, so its NOT local - but local debugging is as slow.

greetings!

wave 2 Add-in not found

$
0
0
I want to use control add-in in my project on wave 2
gb9f53dmo12p.png
With setting
1u05ncazaiml.png
But I have this error
An assembly named 'Microsoft.Dynamics.Nav.Integration.Office, Version=13.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be found in the assembly probing paths 'my folder\./.netpackages, C:\Windows\assembly, C:\Windows\Microsoft.NET\assembly, C:\Windows\Microsoft.NET\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089, C:\Windows\Microsoft.NET\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089'
what am I doing wrong?

EU VAT Reg No. Validation Service Setup

$
0
0
Hello,

Does anyone know if or when a service will be available for UK to validate VAT Registration Numbers? This was previously available via the service connection "EU VAT Reg No. Validation Service Setup" but is no longer valid since we have left the EU.

Thank you.

Microsoft Intereop Excel addin missing

$
0
0
Hi,

I have one network user who can't export from NAV to Excel - a message displays "Cannot load an instance of the following .NET Framework object: assembly Microsoft.office.Interob.Excel, Version=15.0.0.0. Culture=neutral, PublicKeyToken=71e9bce111e9429c.

We're on NAV 2016 CU32 with Office 365.

I've run the setup.exe from the DVD - verified that the Office addin was installed, and also did a "Repair". I did not have the user reboot the workstation (yet).

Also, in my local NAV installation, if I look in Excel File/Options/Add-ins, I see an entry for "Microsoft Dynamics NAV Add-in", with the location of:
file///C:\Program Files (x86)\Microsoft Dynamics NAV\90\RoleTailored Client\Microsoft.Dynamics.Nav.ExcelAddin.vsto|vstolocal

On the user's workstation, that line in her "addins" page does not display. I tried to add the addin (it's not displayed when you click "Manage", "Excel Addins" or "manage","COM Addins", and if I click "Add" on the next page and navigate to that file (Microsoft.Dynamics.Nav.ExcelAddin.vsto), I get an error message
"Microsoft.Office.Nav.ExcelAddin.vsto" is not a valid Office Add-In". I also tried to add "Microsoft.Office.Interop.Excel.dll" with the same result.

I don't know much about .vsto files and how they are "installed", nor do I know that this is the cause of my error.

Has anyone run into this issue, and have a solution short of uninstalling the client and reinstalling?

Thanks

Ron

How to correctly read XML to import the data into a table?

$
0
0
Hi,

Currently I have a procedure that reads and imports some elements from the XML to a table correctly, I only need to read some elements well, since some fields are repeated when they are imported.

I get the XML of a response from a WS, the response is stored in InStream and then I read it to import the information into a table, this is part of the code.
if Client.Send(RequestMessage, ResponseMessage) then begin
            ResponseMessage.Content().ReadAs(InStrmResponse);
            Data.SetCurrentKey(TempLineNo);
            if Data.Find('+') then
                TempLineNo := Data.TempLineNo;
            if XmlDocument.ReadFrom(InStrmResponse, xmlDoc) then begin
                xmlnsMgr.AddNamespace('ns', 'http://www.company.com.br');
                if xmlDoc.SelectNodes('//ns:Movimentacao', xmlnsMgr, xmlNodList) then begin
                    foreach xmlNodRoot in xmlNodList do begin
                        xmlNodRoot.SelectSingleNode('ns:Codigo', xmlnsMgr, xmlNod1);
                        xmlNodRoot.SelectSingleNode('ns:TipoMovimentacao', xmlnsMgr, xmlNod2);
                        xmlNodRoot.SelectSingleNode('ns:DataMovimentacao', xmlnsMgr, xmlNod3);
                        xmlNodRoot.SelectSingleNode('ns:EmpresaOrigem/ns:IDUnihealth', xmlnsMgr, xmlNod4);
                        xmlNodRoot.SelectSingleNode('ns:CentroCustoOrigem/ns:IDUnihealth', xmlnsMgr, xmlNod5);
                        xmlNodRoot.SelectSingleNode('//ns:CentroCustoOrigem/ns:CodigoExterno', xmlnsMgr, xmlNod6);
                        xmlNodRoot.SelectSingleNode('ns:EmpresaDestino/ns:IDUnihealth', xmlnsMgr, xmlNod7);
                        xmlNodRoot.SelectSingleNode('ns:CentroCustoDestino/ns:IDUnihealth', xmlnsMgr, xmlNod8);
                        xmlNodRoot.SelectSingleNode('//ns:CentroCustoDestino/ns:CodigoExterno', xmlnsMgr, xmlNod9);
                        xmlNodRoot.SelectSingleNode('ns:TipoDocumento', xmlnsMgr, xmlNod10);
                        xmlNodRoot.SelectSingleNode('//ns:CodigoDocumento', xmlnsMgr, xmlNod11);
                        xmlNodRoot.SelectSingleNode('ns:Produto/ns:IDUnihealth', xmlnsMgr, xmlNod12);
                        xmlNodRoot.SelectSingleNode('ns:Produto/ns:CodigoExterno', xmlnsMgr, xmlNod13);
                        xmlNodRoot.SelectSingleNode('//ns:CodigoProdutoSecundario', xmlnsMgr, xmlNod14);
                        xmlNodRoot.SelectSingleNode('//ns:CodigoEmbalagemProduto', xmlnsMgr, xmlNod15);
                        xmlNodRoot.SelectSingleNode('ns:Quantidade', xmlnsMgr, xmlNod16);
                        xmlNodRoot.SelectSingleNode('ns:Valor', xmlnsMgr, xmlNod17);
                        xmlNodRoot.SelectSingleNode('ns:Lote', xmlnsMgr, xmlNod18);
                        xmlNodRoot.SelectSingleNode('ns:Validade', xmlnsMgr, xmlNod19);
                        xmlNodRoot.SelectSingleNode('ns:CodigoItemDocumento', xmlnsMgr, xmlNod20);
                        xmlNodRoot.SelectSingleNode('ns:Usuario', xmlnsMgr, xmlNod21);
                        xmlNodRoot.SelectSingleNode('ns:CodigoEtiqueta', xmlnsMgr, xmlNod22);
                        xmlNodRoot.SelectSingleNode('ns:Identificador', xmlnsMgr, xmlNod23);

                        TempLineNo := TempLineNo + 1;
                        Data.TempLineNo := TempLineNo;
                        Data.Init();
                        Data.Insert(true);

                        Data.Codigo := (xmlNod1.AsXmlElement().InnerXml);
                        Data.TipoMovimentacao := (xmlNod2.AsXmlElement().InnerText);

                        txtDate := (xmlNod3.AsXmlElement().InnerText);
                        txtNewDate := CopyStr(txtDate, 1, 4)
                        + '-' + CopyStr(txtDate, 6, 2)
                        + '-' + CopyStr(txtDate, 9, 2)
                        + ' ' + CopyStr(txtDate, 12, 2)
                        + ':' + CopyStr(txtDate, 15, 2)
                        + ':' + CopyStr(txtDate, 18, 2);
                        Evaluate(formatDate, txtNewDate);
                        Data.DateMovimentacao := formatDate;

                        Data.EmpresaOrigemIDUnihealth := (xmlNod4.AsXmlElement().InnerText);
                        Data.CentroCustoOrigemIDUnihealth := (xmlNod5.AsXmlElement().InnerText);
                        Data.CentroCustoOrigemCodExterno := (xmlNod6.AsXmlElement().InnerText);
                        Data.EmpresaDestinoIDUnihealth := (xmlNod7.AsXmlElement().InnerText);
                        Data.CentroCustDestinoIDUnihealth := (xmlNod8.AsXmlElement().InnerText);
                        Data.CentroCustDestinoIDCodExterno := (xmlNod9.AsXmlElement().InnerText);
                        Data.TipoDocumento := (xmlNod10.AsXmlElement().InnerText);
                        Data.CodigoDocumento := (xmlNod11.AsXmlElement().InnerText);
                        Data.ProductoIDUnihealth := (xmlNod12.AsXmlElement().InnerText);
                        Data.ProductoCodigoExterno := (xmlNod13.AsXmlElement().InnerText);
                        Data.CodigoProdutoSecundario := (xmlNod14.AsXmlElement().InnerText);
                        Data.CodigoEmbalagemProduto := (xmlNod15.AsXmlElement().InnerText);
                        Data.Quantidade := (xmlNod16.AsXmlElement().InnerText);
                        Data.Valor := (xmlNod17.AsXmlElement().InnerText);
                        Data.Lote := (xmlNod18.AsXmlElement().InnerText);
                        Data.Validade := (xmlNod19.AsXmlElement().InnerText);
                        Data.CodigoItemDocumento := (xmlNod20.AsXmlElement().InnerText);
                        Data.Usuario := (xmlNod21.AsXmlElement().InnerText);
                        Data.CodigoEtiqueta := (xmlNod22.AsXmlElement().InnerText);
                        Data.Identificador := (xmlNod23.AsXmlElement().InnerText);
                        Data.Modify(true);
                    end;
                end;
            end;

So that I can read some elements I had to add a double slash (//) since if I didn't I would see an error similar to this: "The XPath query 'ns:Lote' does not match any nodes", with the code above I I'm not getting that error and the records import apparently fine, but repeated. What should I do so that the records are not repeated in cases that must start with a double bar or what should I do to avoid putting them?

This is the structure of the XML

vcqub62j49bt.jpg

Import CSV file that has different table structure then the table into CSV is being imported

$
0
0
Hi,

I need to import some data saved in CSV file into T81 - Gen. Journal Line
File structure of CSV file is not identical to table structure.

How to import such CSV using XMLPort? Should I import first in Temp Table and then from temporary table to T81?

Thank you
BR Damjan

Automated Testing: Check Validation Message

$
0
0
Hi All

I'm writing automated tests for one of our extensions and I need to confirm that the validation message is correct as part of the test.

Let's take a simple (made up) case

Record.Field1 cannot be more than 2x it's current value.
The extension would have an Subscription to the OnAfterValidateEvent and raise an error such as this:

Error(StrSubstNo(QtyTooHighMsg, Format(MaxQty)));

In the UI, I get the red X and when I hover over it I see a message that is something like this "The number entered is too high. The max value is 20"

So My test would create a record with value 10 and then do record.Validate(Field1, 25). My asserterror catches the error and the test continues. but I want an assertion that the validation message did, in fact say "The number entered is too high. The max value is 20"

I don't see any kind of HandlerFunction Attribute that I can use to test this. Did I miss something?

If not, is there another way?

Finally is here a way in the test to "click" revert?

Thanks

Mark

Insert Sales Lines AFTER Sales Header complete Or aster MakeOrder complete

$
0
0
Hi All

We want to insert freight charges (non inv items) on sale orders automatically. The item inserted will be dependent on the ship method. We have a version that works using a event subscription on the ship method code in sales header

Works great when I change the ship method, but I have 2 problems

1. if I create a new sales order for a customer who has a default ship method, the ship method is set before the sell-as customer is set, so inserting a line fails

2. Also when I do make order from a blanket, the make order always starts at line 10,000, so if I have already inserted my freigh item 9after header was created) it fails because line 10,000 exists

So I have two questions

1
  1. Is there way to figure out when the entire sales header is inserted (to solve no 1)
  2. Is there a way to figure out when the Make Order function has completed (i.e. all lines are inserted) (to solve No 2)

Thnaks

Mark

RDLC report with Item table left join to purchase line

$
0
0
Hi Guys
I thought when creating the dataset in AL I have the option to determine join type but couldn't find it. So my requirement is to show all items and for items with open purchase order lines, show the next delivery dates in columns. I used below link to link po line to item:

dataitem("Purchase Line"; "Purchase Line")
{
DataItemLink = "No." = FIELD("No."), "Variant Code" = FIELD("Variant Filter"), "Location Code" = FIELD("Location Filter"), "Shortcut Dimension 1 Code" = FIELD("Global Dimension 1 Filter"), "Shortcut Dimension 2 Code" = FIELD("Glob
DataItemTableView = SORTING("Document Type", Type, "No.", "Variant Code", "Drop Shipment", "Location Code", "Expected Receipt Date") WHERE(Type = CONST(Item), "Document Type" = CONST(Order), "Outstanding Quantity" = FILTER(<> 0));


However, using above link I dataset only provides item with a po line as where clause applies to all. Is there another way to get a dataset with a left join or is there a standard report with this kind of logic I can check?
Thanks

BC App Publish - Digital Sign

$
0
0
Hi,

I need urgent help

My first app is ready to publish on app-source, it is only 1 issue to solve to go-live
I need to digitally sign my app
I have tried everything but nothing working

https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-sign-extension
https://community.dynamics.com/business/f/dynamics-365-business-central-forum/308085/issue-signing-the-dynamics-365-package?pifragment-96728=1

Which FREE website is best for creating ssl certificate, I am using zerossl ?

I have used all commands but nothing working, is there any step-by-step instruction?

openssl pkcs12 -export
SignTool sign /f

mbsfaobdgcrq.png

Why no Notification data type in navision 2016

$
0
0

Why no Notification data type in navision 2016. How could I get Notification data type.

Printing pdf file on network printer by Job Queue/Task Scheduler

$
0
0
Hi,
Do you known posibility to printing pdf file on network printer by Job Queue/Task Scheduler.
I tryed it by ProcessStartInfo but this DotNet variable requair Running On Client, but this is imposible to run on Job Queue.
Version: BC 14 OnPrem
Please help.

How to make single Purchase Receipt against multiple Purchase Orders.

$
0
0
Hi Team,

Can we make single Purchase Receipt against multiple Purchase Orders.

Thanks in advance,
Srinvias.

NAV 2013 / Net Tcp Port Sharing / Dedicated service account

$
0
0
Hello all,

I try to configure a port sharing between the different services Navision.
I have set a service account, who is a AD user, to launch the services.
This account is not an admin account (local and domain). I don't want that it have this permission.
But he is in the group "Log on as a service".
I've followed this article : https://docs.microsoft.com/en-us/dynamics-nav/provisioning-the-microsoft-dynamics-nav-server-account.
When I start one Navision service I've this error :
Detailed error information:System.ServiceModel.CommunicationException: The service endpoint failed to listen on the URI 'net.tcp://stnasfrbzggz30.gazechim.local:7046/DynamicsNAVPB_FR_TEST/Service' because access was denied. Verify that the current user is granted access in the appropriate allowAccounts section of SMSvcHost.exe.config. ---> System.ComponentModel.Win32Exception: Access is denied.
In more the account can run the service "NetTcpPortSharing", before that was not possible.
However when I give it the local administrator right, the Navision service run.
So how to set the sharing TCP with a non administrator account service ?!

Thanks in advance.

How to setup trailing sales orders NAV 2018?

$
0
0
I need to show amount the only that is not accumulated from the previous year
z6vblvybv85q.png

in the picture is sum previous year

thank you for your answer.

Debug Onprem with AAD Authentication

$
0
0
Hi!
We have a customer that has a onprem envrionment with AAD authentication.
Is it possible to debug a user session that is connected with AAD?

What I can read it isnt possible which is really awful if that is through.
"AAD authentication is supported only for Dynamics 365 Business Central sandboxes. AAD authentication cannot be used for on-premise servers."
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-json-files

What have you done to be able to debug your customer users?
Viewing all 10032 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>