Quantcast
Channel: NAV/Navision Classic Client — mibuso.com
Viewing all 2455 articles
Browse latest View live

Setrange with an option field

$
0
0
Why this isn't working?

Table.setrange("Reason for Archiving",'<>%1|<>%2|<>%3', Table."Reason for Archiving"::'Delete Manually',Table."Reason for Archiving"::'Delete Completed Document',Table."Reason for Archiving"::'Delete Manually without Posting');

Thank you!

Maninfest throws an error, when I try to add and run a control Add-in in Navision

$
0
0
Hello every one,
I am a new software developer and just started to learn Navision. I want to add a very simple add-in which will desplay hello world in page. I followed a guide from internet exacly as it is there, but, when I am trying to run my page, I get this error "The control add-in manifest is not valid (The control add-in manifest does not include a script).", even if my manifest is not empty,and it looks like this

<?xml version="1.0" encoding="utf-8"?>
<Maninfest>
<ScriptsUrls>
<ScriptUrl>http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js</ScriptUrl&gt;
</ScriptsUrls>
<Script>
<![CDATA[
$(document).ready(function()
{
$('#controlAddIn').append('Dummy, you did it');
});
]]>
</Script>
</Maninfest>


I even tryed to make a separate script instead of hardcoding it in manifest, but got the same error as previous. I have created an extesibility control, deployed and used it as it requires. Looking forward to hear from you, any help would be nice. Thank you in advance

Create PDF 2.* NAV2009 Classic

$
0
0
Hello everyone, I have a problem that is driving me crazy, I have to create a PDF file version 2.+ with nav2009 Classic, is there anyone who can tell me how to do?
I'll have on your conscience if I do not solve :)
THANK YOU.

Not able raise the bill in LSRetail in Particular POS terminal no LG0104

$
0
0
Error message :
Microsoft Dynamics NAV Classic
The POS Voided Transaction already exists. Identification fields and values: Receipt No.='0000LG0104000012649'
OK

Import Historical transactions of companies into single company

$
0
0
My company has asked me to read up on the possibilities of merging data of three companies into single company. we are on NAV 2009 IN Version.

Eg. we are using three NAV companies within India. like Chennai, Bangalore and Mumbai as separate companies for STPI reporting purpose and also acquired a company. have been proposing them to use a single company instead and will get the report based on Dimension for reporting purpose. so now, company wants to see if we can import the historical transactions into one single company as India. Currently we are managing by consolidated company (which has summarized transactions of all 3 companies). It is becoming difficult to manage for analysis purpose. All the above three companies are in same version/db. so decided to have one single company.


i tried these tools to copy data, but this seems to be overwriting when the other company data is imported.
www.mibuso.com/dlinfo.asp

Any help would be appreciated.

thanks in advance

How to use Dynamics NAV 2016 for creating Manual & Automated Data entry using Incoming Documents

$
0
0
How to use Dynamics NAV 2016 for creating Manual & Automated Data entry using Incoming Documents

Some problems with currency import

$
0
0
Hi, friends!
I have obscure problem with currency import.
So, I wrote report for updating exchange rate from European central bank at it starts every day under NAS as a job queue. It works fine during two weeks, but then it failed. Report works, but exchange rate load wrong, look at screenshot. It is so strange, because I can not catch error with debugger, report works correctly if I start him in manual mode (from development environment).

Options, options

$
0
0
Can anyone with expirence with the option datatype give me some help? I have a field "X" setup as an option type with "A" and "B" as the values to choose from. I know I can use IF X::A THEN to catch if the value is "A" but how can I determine if the user hasn't set the option? How can I test for null?

C# COM dll - Could not create an instance of the OLE control or Automation server

$
0
0
Hello,

I'm developing a report for Navision 2009 SP1, where the need for extra functionality unavailable in NAV has arisen.

I have created a COM dll in C#, installed it and created an automation variable in NAV. When I try to CREATE it, I get the following error:
"Could not create an instance of the OLE control or Automation server identified by..... Check that the OLE control or Automation server is correctly installed and registered."

The DLL should be correct, this is the code (just sample code to get a working connection between NAV and DLL):
    [ComVisible(true), Guid("080a97fb-321c-4a2f-b948-dd52ce263415"), InterfaceType(ComInterfaceType.InterfaceIsDual)]
    public interface IPrinterTest
    {
        [DispId(1)]
        bool Print(string test, string bytesInStringRepresentation);
    }

    [ClassInterface(ClassInterfaceType.None), ComVisible(true), Guid("8d7b85a9-1a20-4ea0-a7d4-decf26632eee"), ProgId("Printer.PrinterTest")]
    public class PrinterTest : IPrinterTest
    {
        public PrinterTest()
        {

        }

        public bool Print(string test, string bytesInStringRepresentation)
        {
            return true;
        }
    }

The DLL is registered as a COM dll through InstallShield.

I hope you have enough information, or have been in the same situation and can help out.

Best regards
Marcus

What is a C/AL code module?

$
0
0
What is a C/AL code module? Is it a function? Is it similar to a Visual Basic code module? I cannot find definition anywhere.

Consuming a Codeunit Web Service problem

$
0
0
Hi guys,
I have a problem with consuming web service codeunit on a couple of different databases.
I’ve used the walkthrough example from Microsoft link.

I created the codeunit for receiving price/rebate on three different databases (for different customers). Codeunit is the same for all three databases and when I call them via C# web service I only change URL.
Problem occurs if the different users send the request for the same article in the same time and then they as a result get back wrong price/rebate.
For example. user x request for article no. 0001 but in the same time user y send request for article no. 0001 but on different database (different price/rabate). As a result in C# web service I get switched values.

Does someone has an idea how solve this kind of problem?

Payment Export Data for SEPA

$
0
0
Hi everybody,

I'm working on the Microsoft objects for generate SEPA files.
Can anyone tell me where the table "Payment Export Data" is deleted?

Thanks!

Drop column in SQL but not from Nav

$
0
0
Hi everyone.
I'm newbie in Nav, accidentally I've run SQL Command 'Alter Table [TableName] Dorp Column [ColumnName]'. But I have not deleted that column from Nav. And now, there are two errors appears when Im trying to drop that column and compiling object in Nav.
Errors:
5074, "42000", [Microsoft][ODBC SQL Server Driver][SQL Server] object "DF_LLC_Trad_Compa_7EEEF5F1" depends from column "Company" (Its my column name)
4922, "42000", [Microsoft][ODBC SQL Server Driver][SQL Server] Alter Table Dorp Column Company, because one or more objects access this column.
I've already tryed to export this object from backup database, but it didn't help
Is there any way to delete that column from Nav?

Thanks.
___________________
Nav 4.0
MS SQL Server 2008

Automate Backup of 2009 native database

$
0
0
Hi

I have one client that is still running on the 2009 native database. They will be upgrading in January to 2017. Till now I have been using HotCopy which works well but the file size after compression is 2.5gb. A compressed fbk is only 161mb. I would like to automate the FBK backups and upload them to the cloud.

There is a wonderful script that I found on Mibuso, and it works perfectly to run the backup, but it runs from a form.
http://forum.mibuso.com/discussion/21430/autobackup-from-navision-client-not-nas

I tried to create a CU using similar code, but the timer never executes and I have no idea why!!! I'm really out of my depth here. Any suggestions, other than buying ExpandIt, would be really appreciated.

OnRun()
Description := STRSUBSTNO(Text0002,TODAY);
Filename := STRSUBSTNO(Text0005,TODAY);

IF ISCLEAR(WSHShell) THEN
CREATE(WSHShell);

IF ISCLEAR(Timer) THEN
CREATE(Timer);

Timer.Interval(100);
Timer.Enabled(TRUE);

Timer::Timer(Milliseconds : Integer)

IF NOT ShellIsSend THEN BEGIN
WSHShell.SendKeys('%tb');
ShellIsSend := TRUE;
BEEP(440,100);
END ELSE BEGIN
IF NOT ShellIsSend2 THEN BEGIN
WSHShell.SendKeys(Description);
WSHShell.SendKeys('{DOWN}');
WSHShell.SendKeys(Filename);
WSHShell.SendKeys('{DOWN}');
WSHShell.SendKeys('{Enter}');
WSHShell.SendKeys('{Enter}');
ShellIsSend2 := TRUE;
Timer.Enabled(FALSE);
END;
END;


Thanks - Noeline

Can I use FINDLAST function on date and time?

$
0
0
Hello guys,

I have a question.
I have to attach the last modify user's signature on report so l check it by this ..

igg7twwn6wqz.jpg


"ApprovalEntry" keeps the last Entry No. of Approval Entry that filtered by Sales Quotation No. and status = Released.
we had no problem until this below happened

dx5rwmm3enr8.jpg


by Last Date-Time modified Entry No. 2380 was created before Entry No. 2381.

I would like to know is there the way that l can check last Date-Tim Modified instead of Entry No.?

Thank you for your help.

Undo whs. shipment

$
0
0
There were made Sales Shipment from Sales order.....then we moved to the Advanced Warehousing - with Directed Put-away / pick. And then it is created Undo to that shipment document, witch were booked before moving ...
In result product appearing in stock but does not appear in any binary ... it is also the main problem ... how to put in Bina without increasing warehouse

Service Contract Line Value based on Currency Code

$
0
0
Hi,
The Currency Code on Service Contract header is the code in which the amount value on the document related to this contract will be converted and NOT the code in which the Line Value on the Service Contract subform is to be entered.
Am i right?

One of my client has a requirement that he needs to manually do the conversion which entering the value in LCY on Line Value column of the Service Contract Line whereas the invoice is to be obtained in FCY. He wants that if he enters Currency Code on the header in INR and the Line Value on the subform should also be entered in INR and NOT LCY.

I have thought of a workaround to achieve this by tweaking the CU 5940-ServContractManagement.
I think the AmountToFCY() handles the conversion when generating the service ledger entry as below:
AmountToFCY(AmountLCY : Decimal;VAR SalesHeader3 : Record "Sales Header") : Decimal
Currency.GET(SalesHeader3."Currency Code");
Currency.TESTFIELD("Unit-Amount Rounding Precision");
  ROUND(
    CurrExchRate.ExchangeAmtLCYToFCY(
      SalesHeader3."Posting Date",SalesHeader3."Currency Code",
      AmountLCY,SalesHeader3."Currency Factor"),
      Currency."Unit-Amount Rounding Precision"));
If i change the above code to
AmountToFCY(AmountLCY : Decimal;VAR SalesHeader3 : Record "Sales Header") : Decimal
Currency.GET(SalesHeader3."Currency Code");
Currency.TESTFIELD("Unit-Amount Rounding Precision");
EXIT(LCY)
then i think it should be fine to meet the client's requirement.

However i am slightly not in favour of changing the standard base code.
Can this be achieved via some setup?
Is there any other alternative?

Any suggestion?

Regards,
Hemant

UPS Tracking works on client side but Server side gives an error message

$
0
0
Curious if anybody has had such problem.

We have a routine that tracks UPS delivery data using "Microsoft XML, v6.0'.XMLHTTP60". When I send the request to https://wwwcie.ups.com/ups.app/xml/Track from NAV client, it works perfectly. When I trigger the request from Web Services, it errors out at send() function saying

"This message is for C/AL programmers: The call to member send failed: The system cannot locate the resource specified

."


It's the exact same code that I am running.


//tfile contains the UPS xml data that has two XML roots. That's why I use a temporary file.
//This code works perfectly on client but fails on server.

tFile.CREATEOUTSTREAM(vtVar);
IF ISCLEAR(winXMLHttp) THEN
CREATE(winXMLHttp);
winXMLHttp.open('POST',EndPointURL,0);

winXMLHttp.send(vtVar);
vtVar := winXMLHttp.responseStream;
CREATE(XMLDom);
XMLDom.load(vtVar);


I've tried changing the code and use "'Microsoft WinHTTP Services, version 5.1'.WinHttpRequest" instead. The client worked well again, but server side gave an error saying "This message is for C/AL programmers: The call to member Send failed: A connection with the server could not be established"

Code for this:

IF ISCLEAR(winhttp) THEN
CREATE(winhttp);
EndPointURL := 'https://wwwcie.ups.com/ups.app/xml/Track';
winhttp.Open('POST',EndPointURL,0);
winhttp.SetRequestHeader('Content-type','text/xml');
winhttp.SetTimeouts(1000,1000,1000,1000);
winhttp.Send(ReqText);
winhttp.WaitForResponse(2000);
IF ISCLEAR(XMLDom) THEN
CREATE(XMLDom);
XMLDom.load(winhttp.ResponseStream);
CLEAR(winhttp);


Any help is appreciated!

Error on a simple inventory count import

$
0
0
Hi all,

Can someone please tell me why my code would error out on CU 5402 UOM Mgmt, specifically at the Item.Testfield("No.) line under GetQtyPerUnitofMeasure function? Below is my code to import 6 columns of data: locationcode,item,variantcode,qty,UOM,BusinessEntity.

I already set up a Item Journal template called Item with batch name = AU007. I can't understand why it would error out. Please help.

I have included the data from my csv file here...


AU007 A045 001-00 1 EA AU
AU007 A045 1882-00 1 EA AU
AU007 A045 1887-00 -1 EA AU
AU007 A045 511-00 1 EA AU


The error is You must specify No. in ItemNo?



Integer - OnBeforeImportRecord()
LocationCode := '';
ItemNo := '';
VariantCode := '';
Qty := '';
UOM := '';
BusinessEntity := '';

Integer - OnAfterImportRecord()
LineNo += 10000;

WITH ItemJnlLine DO BEGIN
INIT;
"Journal Template Name" := 'ITEM';
"Journal Batch Name" := 'AU007';
"Line No." := LineNo;
"Reason Code" := 'COUNT';
INSERT(TRUE);

"Posting Date" := 020117D;
VALIDATE("Entry Type",ItemJnlLine."Entry Type"::"Positive Adjmt.");
"Document No." := 'AU_invcount';
IF EVALUATE("Location Code",LocationCode) THEN
VALIDATE("Location Code");
IF EVALUATE("Item No.",ItemNo) THEN
VALIDATE("Item No.");
IF EVALUATE("Variant Code",VariantCode) THEN
VALIDATE("Variant Code");
IF EVALUATE(Quantity,Qty) THEN
VALIDATE(Quantity);
IF EVALUATE("Unit of Measure Code",UOM) THEN
VALIDATE("Unit of Measure Code");
IF EVALUATE("Shortcut Dimension 2 Code",BusinessEntity) THEN
VALIDATE("Shortcut Dimension 2 Code");
MODIFY(TRUE);
END;

Reports - ProcessingOnly property

$
0
0
Hi!

I have about 300 new reports in my nav database and I need to write down the names of only those that are not ProcessingOnly. Do you know any smart way how to do this quick? Can I filter my new reports somehow? It'll take some time to check every single new report.
I'll appreciate any clues! :)
Viewing all 2455 articles
Browse latest View live