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

WebService reference not updated in .Net

$
0
0
I have a NAV page published as a webservice but the client .NET app can't update the Reference.cs file which contains definitions for all classes, enums, fields, etc from the webservice. In Visual Studio I tried updating the web references but still no help. For example there is the following enum definition in Reference.cs:

public enum WarehouseShipmentList_Fields {

/// <remarks/>
No,

/// <remarks/>
Location_Code,

....

}


At the bottom of the enum there should be the value:
/// <remarks/>
PickingType

... but it's not appearing, although when loading the page through the browser it shows the missing field (see the attached screenshots). Can you please help?


Nav 2016 Sales invoice unit price incl of tax not working

$
0
0
In Nav 2016, business requirement is, salesmen will enter unit price of incl tax. But in under sales invoice page ->Lines section-> i have added the column of unit price incl of tax, when i entered the value, it's not working with Qty, statistics in total incl Tax showing zero but when i entered with unit price exl of tax column, it working fine with QTY. it's GST structure not VAT. Please advise how to swap and make it working with unit price incl of taxes

How to make variable calculations in a Report.

$
0
0
Hi guys I'm new here ...i have a doubt i have to make some vars calcs in a report
and i have to show vars in each DataItem customer process. I think i dont need CREATETOTAL NAV Function beacuse vars are not in FOOTER or GROUP Sections,
so I need help to make calcs. Here's the code..thanks.

Salesperson/Purchaser - OnAfterGetRecord()

SalesPersonCode := Code;

Customer - OnAfterGetRecord()
TotalMCurrYear := 0;
TotalMPrevYear := 0;

recSalesInvHeader.RESET;
recSalesInvHeader.SETRANGE("Sell-to Customer No.", "No.");
recSalesInvHeader.SETRANGE("Salesperson Code", SalesPersonCode);
recSalesInvHeader.SETFILTER("Due Date", '%1..%2', FInicio, FFin);
IF recSalesInvHeader.FINDSET THEN BEGIN
REPEAT
recSalesInvLine.RESET;
recSalesInvLine.SETRANGE("Document No.", recSalesInvHeader."No.");
IF recSalesInvLine.FINDSET THEN
REPEAT
TotalMCurrYear += recSalesInvLine.Amount;
UNTIL recSalesInvLine.NEXT = 0;
UNTIL recSalesInvHeader.NEXT = 0;
END;

recSalesInvHeader.RESET;
recSalesInvHeader.SETRANGE("Sell-to Customer No.", "No.");
recSalesInvHeader.SETRANGE("Salesperson Code", SalesPersonCode);
recSalesInvHeader.SETFILTER("Due Date", '%1..%2', FInicioPrevYear, FFinPrevYear);
IF recSalesInvHeader.FINDSET THEN BEGIN
REPEAT
recSalesInvLine.RESET;
recSalesInvLine.SETRANGE("Document No.", recSalesInvHeader."No.");
IF recSalesInvLine.FINDSET THEN
REPEAT
TotalMPrevYear += recSalesInvLine.Amount;
UNTIL recSalesInvLine.NEXT = 0;
UNTIL recSalesInvHeader.NEXT = 0;
END;

Is it possible to update the "record" with the latest data?

$
0
0
I'm using Nav 2013 RoleTailored Client.

I have a table called "SharePoint Links", which, if you didn't guess it already, contains links.

I have one page to show these links, and one to manage them.

Let's say that one user decides to add a new link. A second user already has the page that displays the links open, this user will not be able to see the link that the first user just added. I would like for the second user to be able to click a refresh button and then be able to see the latest contents of the table.

Is that possible in NAV? Can I have the page record be refreshed (populated with the latest data from the table)?

Best regards
Marcus

Performance issues in NAV2017 CU11

$
0
0
Hello,

We recently migrated from NAV2009R2 to NAV2017CU11, and we have some long running SQL queries. Almost all of these queries have the same 'signature' in SQL, and start with 'SELECT TOP 50 ISNULL( ...), like this example from the vendor:

SELECT TOP (50) ISNULL("Vendor"."timestamp",@0) AS "timestamp",ISNULL("Vendor"."No_",@1) AS "No_",ISNULL("Vendor"."Name",@2) AS "Name",ISNULL("Vendor"."Search Name",@1) AS "Search Name", ... WHERE (ISNULL("Vendor"."Search Name",@1)=@11 AND ISNULL("Vendor"."No_",@1)&lt;@12 OR ISNULL("Vendor"."Search Name",@1)&lt;@11) ORDER BY "Search Name" DESC,"No_" DESC OPTION(OPTIMIZE FOR UNKNOWN, FAST 50)

Some of these long running queries (on other tables than vendor) take more than 50 seconds to run :o , on a table that only contains about 2.000.000 records.
After investigation it seems that these queries come from pages that are in the background, and have filters on them. If these pages are in the foreground then there is no performance issue, ony if they are minimized and another process is done by the user.

Is there any way to control this kind of behaviour? The 'RefreshOnActivate' property doesn't make any difference. I already disabled the sorting on the page to avoid sorting on flowfields, but this doesn't help.

Any ideas please?

Kind regards,
Andy

NAV 2013 - Field error because table relation looks at primary key,

$
0
0
I have the field "User" which has a table relation to the "User Name" field in the "User" table.

I receive an error when I try to enter the value of the field manually instead of using the lookup form. If I enter a correct User Name, I get the following error:

pfkts5dmnn26.jpg

yggw5ykag7a9.jpg

I think this is because of the primary key in the "User" table, as it is set to the Users "Security ID" which is a GUID.

What I want to know, is if there is a way to fix this small problem.

I could set the "Editable" property of the field to "False", however then one doesn't get the dropdown indicator....

Data director 3.0 with nav

$
0
0
Hello,
I am having a problem with the new data director 3.0 which ive been working on with the job monitor, whenever a job freezes or results in an error all the following jobs freeze and the whole replication process is compromised! I was told that a job causing a problem would do that with this version of DD! This never happened when we were working with nav 2009 is there any way to work around it? I cancelled the job causing the problems but i cant just sit there all day watching the monitor for jobs failing.
The jobs are stuck with status processing until the job is cancelled

NAV2018: VSCode UpgradePerCompany/Database

$
0
0
Hi all,

It seems that when you republish an extension from VSCode (CTRL +F5) all the data inside the tables of your extension is removed.
I've read all there is to read about upgrade codeunits but it does not seem that OnNavAppUpgradePerCompany and OnNavAppUpgradePerDatabase works yet for extensions (with the use of NAVAPP.RestoreArchiveData of course)?

Last update I could find about this can be found here: https://github.com/Microsoft/AL/issues/62

Does anyone else have any information when we can expect this feature? If we can't upgrade our data then we can't republish any extensions (even if both publications are identical) which means we can't use extensions :-)

Thank you!

Regards from Mattias

"Item Ledger Entry type" in value entry table

$
0
0
"Item Ledger Entry type" in value entry. I was under the impression that this field would always be the same as the "entry type" in Item Ledger Entry. But this not the case when a purchase item charge is applied to transfer receipts.
This looks like a bug. Do you agree or disagree?

Here is a screenshot.

pmu0ifq42tra.png

CAL in 2018

$
0
0
I wondered if someone can just give me some clarification over CAL code in 2018. If we are to be customising the product, for example, changing a posting routine, is this still to be done in CAL in the development environment or should we be looking to do this in AL?

unable to insert a new entry in subform

$
0
0
version is 2016.
main form's(List) pk is a fk in subform(listpart).

Try to insert a new entry, I got this warning
"The view is filtered, and the entry is outside the filter. Some actions may not work."

So.. I can't insert a new entry .......
Even If main form page type is document, I got same situation.
How can I do?

Sort a table in Report

$
0
0
Hi all, I have to print a report showing a table sorted for a choosen field.
The table is sorted by default with the primary key, let's say "No.". I have to sort the table with another key, let's say "Posing Date". How can I do it?
Thanks.

I want to restore default standard NAV Workflow Templates, is there a quick way to do this?

$
0
0
Hello

Within NAV 2016, I want to restore default standard NAV Workflow Templates, is there a quick way to do this?

XML Port Table indent error for multiple tables.

$
0
0
Hi everyone,

I am trying to import and export a CSV file to create a sales order. Here is a sample of it.

nayic4dssbsy.png

In the above image, the Format property is set to XML. Now for that indentation, there is no error. When I change the format property to variable Text. I get that Table indentation error.

"An element with source type Table cannot have Table element children."

Since I am exporting from multiple tables sales header and sales line. The indentation should not change right? I tried changing the indentation but it did not work the way I want, because the sales lines showed up at the end after all the sales header fields. Could someone help me out on what should I do?

EDIT: I checked out some forums and it seems like nav doesn't allow this combination. There were lots of suggestion to use an Integer table. Could someone throw me an example on how to use integer table or is there any other way?

Thanks in advance,
Mathan

Codeunit 80 adding code to use for extension

$
0
0
Hi,

I want to make a change in NAV 17 using extensions. So the change basically will be using the standard objects. I have some extra fields on sales tables that need to be transferred to Cust Ledger Entries (extra fields are on cust ledger table as well) when sales invoice is posted.

Traditionally this is easy to do, customisation will be needed in CU 12 and 80 to transfer those extra fields, as I will be using extensions and extra code will need to be placed in customised codeunit which will be used as Subscriber, all is find but my problem is that I cannot find a suitable publisher in CU 80 in the right place to call. Any one has idea?

Thanks

How to customize the ribbon

$
0
0
I need to edit ribbon..

g9z2y03awauv.png
capture1 is now..


eh4ud3coj7il.png
capture2 is that I want to edit like that as a default.

I try to customize ribbon in RTC.. but It shows only for me..
I need to all..

Import one header multiple lines in invoice

To Export selected attachment for a record.

$
0
0
Hi Friends,

[Version: NAV 2016]
I need to IMPORT/EXPORT/DELETE attachment and found a solution by browsing on internet. Below coding is working fine except for exporting multiple files for a record. I have given entire working code to show what I did.


New Table: Document Attachment Table with below fields.
1. Primary Key (RecordID)
2. Attachment (BLOB)
3. Extension (Text 30)
4. Document No. (Code 20)
5. Name of the File (Text 50)
6. Line No. (Integer)

Table: Global Variables
Filename (Text 1024)
ServerFilename (Text 1024)
FileManagement (Codeunit - File Management)
ExtensionStart (Integer)
TempBlob (Record - TempBlob)

Table: Text Constants
Text001	Do you want to overwrite existing attachment?
Text002	Import attachment.
Text003	Update attachment.
Text004	No attachment in current document.
Text005	Attachment File %1 imported successfully.
Text006	Do you want to delete the attachment in %1?

Table: Functions
ImportAttachment
ExportAttachment
DeleteAttachment
UpdateAttachment
RecordExist

ImportAttachment(RecIDToImport : RecordID)
IF RecordExist(RecIDToImport) THEN
EXIT;

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);


ExportAttachment(RecIDToExport : RecordID;RecLineNo : Integer;RecNameofFile : Text)
SETRANGE("Primary Key",RecIDToExport);
SETRANGE("Line No.",RecLineNo);
SETRANGE("Name of the File",RecNameofFile);
IF NOT FINDFIRST THEN
  ERROR(Text004);
CALCFIELDS(Attachment);
IF NOT Attachment.HASVALUE THEN
  ERROR(Text004);
TempBlob.Blob := Attachment;
FileManagement.BLOBExport(TempBlob,FORMAT('*' + Extension + ''),TRUE);


DeleteAttachment(RecIDToDelete : RecordID)
SETRANGE("Primary Key",RecIDToDelete);
IF NOT FINDFIRST THEN
  ERROR(Text004);
CALCFIELDS(Attachment);
IF Attachment.HASVALUE THEN
  IF CONFIRM(Text006,FALSE,RecIDToDelete) THEN
    DELETE;

UpdateAttachment(VAR RecIDToUpdate : RecordID)
CALCFIELDS(Attachment);
IF NOT CONFIRM(Text001) THEN
  EXIT;
Filename := FileManagement.BLOBImportWithFilter(TempBlob,Text002,'','*.*|','*.*');
IF Filename = '' THEN
  EXIT;
Attachment := TempBlob.Blob;
"Name of the File" := FileManagement.GetFileName(Filename);
Extension := '.' + FileManagement.GetExtension(Filename);
MODIFY;
IF Attachment.HASVALUE THEN
  MESSAGE(Text005,Filename);

RecordExist(RecIDToCheck : RecordID) : Boolean
SETRANGE("Primary Key",RecIDToCheck);
IF NOT FINDFIRST THEN
  EXIT(FALSE);
UpdateAttachment(RecIDToCheck);
EXIT(TRUE);


I am calling the functions from Page (action pane) and those codings are given below.

Page - Global Variables
AttachmentManagement (Record - Document Attachment Table)
AttachmentRecRef (RecordRef)
AttachmentRecID (RecordID)

Page Functions

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

ExportAttachment - OnAction()
AttachmentRecRef.OPEN(DATABASE::"Purch. Request Header");
AttachmentRecRef.SETPOSITION(GETPOSITION);
AttachmentRecID := AttachmentRecRef.RECORDID;
AttachmentRecRef.CLOSE;
AttachmentManagement.ExportAttachment(AttachmentRecID);

DeleteAttachment - OnAction()
AttachmentRecRef.OPEN(DATABASE::"Purch. Request Header");
AttachmentRecRef.SETPOSITION(GETPOSITION);
AttachmentRecID := AttachmentRecRef.RECORDID;
AttachmentRecRef.CLOSE;
AttachmentManagement.DeleteAttachment(AttachmentRecID);


When I tried to import files (multiple files), it is properly importing. But when I tried to export, only first attached file is exporting. Say when I try to export the third attachment for a record, the first attachment is only opening.

I believe it is a minor one but got struck up. Can anyone help how to solve this?

Thanks in advance.

Slow 2017

$
0
0
Hi all
I am upgrading a customer to 2017, and when creating a customer or opening the item or customer card, it is painfully slow.
This seems related to factboxes, and only with customer data, NOT cronus.
So there are many transactions.
CU1 didnt help!

Anyone made it so far and seen the same?

SQL profiler and CPU is showing a lot of activity! But i havent found the cause. Guessing error in flowfield or key.

NAV on Android Phone

$
0
0
Hello,
I'm testing the phone app on Android (7.1.1 and 7.1.2) in combination with NAV 2017 CU11. I have a strange problem: when editing a page, like the customer page, all the entered information disappears. I have tested this on various phones with Android 7.1.1 and 7.1.2, and all have the same problem. I also tested this on a windows phone, and there it works fins (as expected :smile: )
I attached 2 print screens where the issue is shown
Is this some setting on the web client, IIS, NAV, Android, ... ?
I have surfed to the URL on the phone, and this gives the same result.

Any ideas?

itwhv66ulp2z.png
63oduztz2t35.png

Kind regards,
Andy
Viewing all 10032 articles
Browse latest View live