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

Startsession - Stopsession NAV

$
0
0
Hi!

I have a problem with STARTSESSION. I'm going to try to explain. I have a code with next structure in CU5000 (ChangeComapyT is a table that i've create)

CU50000:
.
.
SalesHeader.INSERT;
.
.
ChangeCompanyT.INSERT;

OK := STARTSESSION(SessionEvent."Session ID", CODEUNIT::ChangeCompany, CompanyDest, ChangeCompanyT);
IF NOT OK THEN
ERROR(Text001);
.
.
SalesLine.INSERT();

CU50001 (ChangeCompany)

//PART1 - HEADER

SalesHeader.RESET;
SalesHeader.SETRANGE("No.",Rec.SalesNo);
IF SalesHeader.FINDFIRST THEN BEGIN
SalesHeader.VALIDATE("Sell-to Customer No.",Rec.CustomerNo);
SalesHeader.MODIFY;
END;

//PART2 - LINES

SalesLineOri.CHANGECOMPANY(Rec.CompanyName);
SalesLineOri.SETRANGE("Document No.",Rec.SalesOrderNo);
SalesLineOri.SETRANGE("Document Type",Rec.SalesOrderDT);

IF SalesLineOri.FINDFIRST THEN
REPEAT
SalesLine.SETRANGE("Document No.",Rec.SalesNo);
SalesLine.SETRANGE("Document Type",Rec.SalesOrderDT);
IF SalesLine.FINDFIRST THEN
REPEAT
SalesLine.COPY(SalesLineOri);
SalesLine.MODIFY;
UNTIL SalesLine.NEXT = 0;
UNTIL SalesLineOri.NEXT = 0;




My problem is: PART1 does not work with this code, but if I delete PART 2, PART1 works, I do not understand why this happens.

My second problem is: If i delete part 2 and I put the code in CU5000, when i do SalesHeader.VALIDATE some lines of SalesLine are modified. It seems that STARTSESSION does not run sequentially because i modified SalesLine after STARTSESSION in CU5000. I do not understand the operation of STARTSESSION very well.

I'm sorry because maybe my explanation is bad and my English is worse. Thank you very much if someone can help me.

Applies to Doc. No.

$
0
0
Hi friends,

Need your help.
If on my Customer Ledger Entry or Vendor Ledger Entry I have several transactions with ONE Document No. (example 9 lines transactions with Document No. GL-02-0057), when I made Journals and apply it to one of the 9 lines, example the 3rd line, and when somebody else, posted this Journals, the line that applied is the 1st lines instead of the 3rd lines that already assigned previously.
Anyone knows does this is a bug or the way we journal and apply the entries was wrong ?

Thanks & best regards,
Mulyanti
Indonesia.

Report suddenly hangs on Integer loop.

$
0
0
Hi Experts,

Very strange story.

Yesterday I printed our custom sales invoice report normally.
Today it hangs and gives an error "Out of memory". Debugging goes to CopyLoop - OnBeforeDataItem and then hangs, the code on CopyLoop - OnAfterGetRecord is never shown in debugger.


NAV 2016. What could it be?

Thank you in advance.

Dynamics Business Central Installation Issue

$
0
0
Dear Sir /Madam,

While trying to setup / Install Dynamics Business Central, nothing is happening after "

Creating container bctest from image microsoft/bcsandbox:latest"
steps. I have tried the same for different product version as well. More than 3hrs we have waited for the same but still no result achieved. Let me know the way forwarded to complete installation process.

PS C:\WINDOWS\system32> new-navcontainer -accept_eula `
-containername bctest `
-imageName microsoft/bcsandbox `
-includecside `
-doNotExportObjectsToText
Creating Nav container bctest
Using image microsoft/bcsandbox:latest
NAV Version: 12.2.22932.23097-W1
Generic Tag: 0.0.6.3
Removing container bctest
Removing C:\ProgramData\NavContainerHelper\Extensions\bctest
Creating container bctest from image microsoft/bcsandbox:latest

Awaiting your valuable inputs.

Thanks and regards,

Jubel Thomas

ShowAsTree by code

$
0
0
Hi experts!! thanks in advance

NAV 2018, page->group repeater->ShowASTree = YES
but does not make the indentation

I need show as tree AND Identation, both.

Someone knows how I can handle these properties by code???

Is there a strpost in reverse?

$
0
0
If strpos find the first ocurrence of substring within a string but I need the last ocurrence.

Is there a function?

for example:

string:= 'file://\\Client\I$\INFORMES D&B\BGREEN BIOLOGICAL SYSTEMS SL.htm'

I need to extract 'BGREEN BIOLOGICAL SYSTEMS SL.htm'

but i need to find the last '\'

the string is variable because they are addresses of linked files

Thanks for advance!!!

NAV 2018 and Power BI

$
0
0
Hello, i'm trying to connect from the Power BI desktop application to a NAV 2018 instance. So far it seems like this should be possible but I can't get it to work and can't find a working example online to help me figure it out.

We have NAV 2018 installed on an in-house server and Power BI running on my local system.

As far as I can tell I should be able to select the Dynamics NAV online service:
nyz5hq8cyr45.png

After selecting the source I should enter the value found in the webservice table in NAV in the URL for OData field as described in the image below and click "OK".
siz5es1fuzqq.png

In the following screen I should then enter my user name as registered in NAV and my webservice access key.

When trying to connect an error occurs stating the references can't be verified. I've tried entering my username in various ways to try and make the connection but nothing seems to work.

Any help is appreciated, please let me know if/when you need more information.

Thanks in advance, Tim.

Auto Restore in NAV 2016 CU30 Database

$
0
0
Dear Sir,

I have posted few Sales Orders in NAV 2016 CU30 Database.

After that I have found nothing when I try to find them in the Posted Sales Invoice page. Even I have not found any entries in G/L Entry Table/Customer Ledger Table, etc....related to that Documents posting.

During further investigation, I have found that a old backup file has been restored in my database & replaced all the activity.
I just want to know how this auto backup restoration activity is executed without any SQL JOB/ User interaction ?

Is it possible ? o:)


Thank you.

OData access outside network

$
0
0
Hi,
I have Dynamics Nav 2017 installed on my server with web client, that I can access outside my network throw https://mydomain.com/NAV/WebClient.
I configured a web service in NAV with https://localhost:7198/NAS/OData/Company('SuperCo')/ProdList (Odata is active on NAS with ssl). It works fine on my network.



so my question is how to get an access to my this odata feed (or for example SOAP) outside my network. How is it? Should I write small proxy .net application and deploy it on IIS?

REPORT.SAVEASPDF hanging in NAV 2013 R2

$
0
0
Good morning!

We have a Report in NAV 2013 R2 which calls the Inventory to G/L Reconcile report (10138) to run in the background, then email the results to user as a PDF sent by SMTP in NAV:
InvtToGl.SetOutputType(FORMAT(OutputType::PDF));
InvtToGl.SAVEASPDF('C:\TEMP\InventoryToGLRec.pdf');


We are having an issue where - depending on the date range provided to the report - the report does not complete. In turn, this leaves a hanging NAV user session which can only be killed by deleting from the Active Session table, and leaves a file handle open to the PDF it attempted to create on the service tier machine. The only way to release the open file and try the report again, is to restart the NAV service.

Is there a limit to how much data the REPORT.SAVEASPDF command can handle? The other possibility I am considering is a piece of bad data somewhere in the result set.

The steps the report goes through every time seem reliable to measure:

> NAV begins running the report and processes for around 8 minutes (Screenshot 1, attached)
> After 8 minutes, a PDF file is created in the specified folder on the service tier (Screenshot 2, attached) and begins writing (Screenshot 3, attached)
> After a further 4 minutes from the date/timestamp of the file on the server, the process will either complete or fail
> If completes successfully, CPU activity drops off, the PDF file is closed, and the size updates from 0 KB to, say, 900 KB (Screenshot 4, attached)
> If it fails, the file remains open, file size 0 KB, and the CPU and memory beginning 'bobbing' up and down - this will continue until the server is restarted (Screenshots 4 & 5, attached)


Any advice would be greatly appreciated - thank you!

Olly

Dynamics 365 BC question

$
0
0
This is regarding Virtual table 2000000028.
We were able to create a page for it and run it.
This pretty much gives you table detail such as number of records.
I did that in my local copy of BC365 (NAV 2018) however when I run it , I don't get any data. It seems to me like it is permission related.
Any ideas ??

Sales Line Line no value with events

$
0
0
Hey,

I have a issue with sales lines and events.

i have a event function that listens to onValidate trigger for No field in Sales Line table.
When No is inserted, the event executes some code. Anyway, my problem is with sales line Line no. The line no is not inserted at the time the No is inserted,
and my code needs to know the line no.

is there any other solutions/workarounds that can / is possible to solve this.?
The solution will be a extension, and therefore, i cannot change any standard page/table property.

Uploading protected sheets to navision

$
0
0
Good Afternon,

Im new here and i liked to say hello to every body first.

But mey qyestion is, is it possible to open an excel file with protected cells in navision???

best regards

error "No POS Menu Line Exists in #DT-GRAPH-GUEST for status 0" Ls retail

$
0
0
Hello everyone,
I have some problem about ls retail (Microsoft Dynamic Nav 2017
Version w1 10.0.18197.0) for Food and beverage module.
I create Dining area profile but when I run Client it pup-up error “No POS Menu Line Exists in #DT-GRAPH-GUEST for status 0”

I test with version 10.0.15601.0 it didn’t have error like that.

Step as below
1. I was created Dining area profile as normal.
Dining area profile

A1.png

Layout
A2.png
Hospitality type
A3.png
Service flow ID:
A4.png

After I run Client error pop-up as picture below
A5.png

I go to check #DT-GRAPH-GUEST. it normal .
A6.png

How to fix this problem?

Thank you.


Has anyone used the GDPR Update (CU4 of Microsoft) on any client?

$
0
0
I've checked the functionality in Cronus and have following doubt:
Export of personal, sensitive, company confidential, etc data has to be done by choosing each separately. And while previewing in NAV, it comes in one window and gets scattered in Excel.

BPost SOAP Call Address Validation

$
0
0
Hi

I'm trying to connect a soap webservice api to validate addresses.
Therefore the Belgian mail delivery company BPost has a free webservice platform to use it.

In the SOAPUI , I could connect and try some requests and got some response. Unfortunately, I have some XML HTTP Status = 500 error when I try to connect in NAV C/AL.

via this website, you can find the documentation of this free webservice "https://www.bpost.be/site/en/webservice-address

Is there someone who can give me some advise? Maybe I'm looking over an connection issue?

New Codeunit Validate Addresses

OnRun()
CLEAR(AutXmlDoc);
CLEAR(AutXmlHttp);

IF ISCLEAR(AutXmlDoc) THEN
  CREATE(AutXmlDoc,FALSE,TRUE);
IF ISCLEAR(AutXmlHttp) THEN
  CREATE(AutXmlHttp,FALSE,TRUE);

AutXmlHttp.open('POST','https://webservices-pub.bpost.be/ws/ExternalMailingAddressProofingCS_v1',FALSE);
AutXmlHttp.setRequestHeader('Content-Type','text/xml; charset=utf-8');
AutXmlHttp.setRequestHeader('SOAPAction',
                            'http://schema.bpost.be/services/common/address/ExternalMailingAddressProofingCS/V001/validateAddress');
AutXmlHttp.setRequestHeader('Operation','validateAddresses');
AutXmlHttp.setRequestHeader('Style','Document');
AutXmlHttp.setRequestHeader('Endpoint','https://webservices-pub.bpost.be/ws/ExternalMailingAddressProofingCS_v1');

FillXMLDoc();

AutXmlHttp.send(AurXmlText.nodeValue);

MESSAGE(FORMAT(AutXmlHttp.status));
IF AutXmlHttp.status = 200 THEN BEGIN
  AutXmlDoc.load(AutXmlHttp.responseXML);
  AutXmlNodeList := AutXmlDoc.childNodes;
 
  FOR i := 0 TO AutXmlNodeList.length - 1 DO BEGIN
    AutXmlNode := AutXmlNodeList.item(i);
    ReadChildNodes(AutXmlNode);
  END;

FillXMLDoc()
AurXmlText := AutXmlDoc.createTextNode('');
AurXmlText.appendData('<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ');
AurXmlText.appendData('xmlns:v001="http://schema.bpost.be/services/common/address/ExternalMailingAddressProofingCSMessages/v001">');
AurXmlText.appendData('<soapenv:Header/>');
AurXmlText.appendData('<soapenv:Body>');
AurXmlText.appendData('<v001:ValidateAddressesRequest>');
AurXmlText.appendData('<v001:AddressToValidateList>');
AurXmlText.appendData('<v001:AddressToValidate id="1">');
AurXmlText.appendData('<v001:MaileeAndAddressee>');
AurXmlText.appendData('<v001:AddresseeIndividualIdentification>');
AurXmlText.appendData('<v001:StructuredAddresseeIndividualIdentification>');
AurXmlText.appendData('</v001:StructuredAddresseeIndividualIdentification>');
AurXmlText.appendData('</v001:AddresseeIndividualIdentification>');
AurXmlText.appendData('<v001:MaileeIndividualIdentification>');
AurXmlText.appendData('<v001:StructuredMaileeIndividualIdentification>');
AurXmlText.appendData('<v001:MaileeRole></v001:MaileeRole>');
AurXmlText.appendData('</v001:StructuredMaileeIndividualIdentification>');
AurXmlText.appendData('</v001:MaileeIndividualIdentification>');
AurXmlText.appendData('<v001:MaileeOrganizationIdentification>');
AurXmlText.appendData('<v001:StructuredMaileeOrganizationIdentification>');
AurXmlText.appendData('</v001:StructuredMaileeOrganizationIdentification>');
AurXmlText.appendData('</v001:MaileeOrganizationIdentification>');
AurXmlText.appendData('<v001:MailRecipientDispatchingInformation>');
AurXmlText.appendData('<v001:StructuredMailRecipientDispatchingInformation>');
AurXmlText.appendData('<v001:Wing>');
AurXmlText.appendData('</v001:Wing>');
AurXmlText.appendData('<v001:Stairwell>');
AurXmlText.appendData('</v001:Stairwell>');
AurXmlText.appendData('<v001:Floor>');
AurXmlText.appendData('</v001:Floor>');
AurXmlText.appendData('<v001:Door>');
AurXmlText.appendData('</v001:Door>');
AurXmlText.appendData('</v001:StructuredMailRecipientDispatchingInformation>');
AurXmlText.appendData('</v001:MailRecipientDispatchingInformation>');
AurXmlText.appendData('</v001:MaileeAndAddressee>');
AurXmlText.appendData('<v001:PostalAddress>');
AurXmlText.appendData('<v001:OtherDeliveryInformation>');
AurXmlText.appendData('<v001:StructuredOtherDeliveryInformation>');
AurXmlText.appendData('</v001:StructuredOtherDeliveryInformation>');
AurXmlText.appendData('</v001:OtherDeliveryInformation>');
AurXmlText.appendData('<v001:DeliveryPointLocation>');
AurXmlText.appendData('<v001:StructuredDeliveryPointLocation>');
AurXmlText.appendData('<v001:StreetName>'+FORMAT(StreetNameG) +'</v001:StreetName>');
AurXmlText.appendData('<v001:StreetNumber>'+FORMAT(StreetNoG)+'</v001:StreetNumber>');
AurXmlText.appendData('<v001:BoxNumber></v001:BoxNumber>');
AurXmlText.appendData('</v001:StructuredDeliveryPointLocation>');
AurXmlText.appendData('</v001:DeliveryPointLocation>');
AurXmlText.appendData('<v001:PostalCodeMunicipality>');
AurXmlText.appendData('<v001:StructuredPostalCodeMunicipality>');
AurXmlText.appendData('<v001:PostalCode>'+FORMAT(PostalCodeG)+'</v001:PostalCode>');
AurXmlText.appendData('<v001:MunicipalityName>'+FORMAT(CityG)+'</v001:MunicipalityName>');
AurXmlText.appendData('</v001:StructuredPostalCodeMunicipality>');
AurXmlText.appendData('</v001:PostalCodeMunicipality>');
AurXmlText.appendData('</v001:PostalAddress>');
AurXmlText.appendData('<v001:DispatchingCountryISOCode>BE</v001:DispatchingCountryISOCode>');
AurXmlText.appendData('<v001:DeliveringCountryISOCode>BE</v001:DeliveringCountryISOCode>');
AurXmlText.appendData('</v001:AddressToValidate>');
AurXmlText.appendData('</v001:AddressToValidateList>');
AurXmlText.appendData('<v001:ValidateAddressOptions>');
AurXmlText.appendData('<v001:IncludeFormatting>true</v001:IncludeFormatting>');
AurXmlText.appendData('<v001:IncludeSuggestions>true</v001:IncludeSuggestions>');
AurXmlText.appendData('<v001:IncludeSubmittedAddress>true</v001:IncludeSubmittedAddress>');
AurXmlText.appendData('</v001:ValidateAddressOptions>');
AurXmlText.appendData('<v001:CallerIdentification>');
AurXmlText.appendData('<v001:CallerName>customername</v001:CallerName>');
AurXmlText.appendData('</v001:CallerIdentification>');
AurXmlText.appendData('</v001:ValidateAddressesRequest>');
AurXmlText.appendData('</soapenv:Body>');
AurXmlText.appendData('</soapenv:Envelope>');

ReadChildNodes()
CASE FORMAT(CurrentXMLNodeP.nodeType) OF
'1': // Element 
  BEGIN
    // Global variable CurrentElementName to keep track of what node
    // we are currently processing
    CurrentElementNameG := CurrentXMLNodeP.nodeName;

    // Process Attributes
    // If the element has attributes, then browse through those.
    TempXMLAttributeListL := CurrentXMLNodeP.attributes;
    FOR k := 0 TO TempXMLAttributeListL.length - 1 DO
      ReadChildNodes(TempXMLAttributeListL.item(k));

    // Process Child nodes
    TempXMLNodeListL := CurrentXMLNodeP.childNodes;
    FOR j := 0 TO TempXMLNodeListL.length - 1 DO
      ReadChildNodes(TempXMLNodeListL.item(j));
  END;

'2': // Attribute 
  BEGIN
    MESSAGE(CurrentElementNameG + ' Attribute : ' +
    FORMAT(CurrentXMLNodeP.nodeName) + ' = ' + FORMAT(CurrentXMLNodeP.nodeValue));
  END;

'3': // Text 
  BEGIN
    MESSAGE(CurrentElementNameG + ' Text = ' + FORMAT(CurrentXMLNodeP.nodeValue));
  END;
END;

SetAddress()
StreetNameG := StreetnameP;
StreetNoG := StreetNoP;
PostalCodeG := PostalCodeP;
CityG := CityP;


SOAPUI Settings, connections and properties.

70nfvallsu0p.jpg
9hhfjmh46pen.jpg
3cwqh9uphg8l.jpg
usvdjj6wqa7w.jpg
3pphq2aowsuq.jpg

Security protocol TLS 1.2 in Dynamics NAV 2013

$
0
0
Hi out there!

I am trying to increase a web requests security protocol in order to access a web service which is requiring TLS 1.2.
My default SSL is not accepted.

The request is send from Dynamics NAV 2013 (7.00).

I have of course searched for a solution to this problem elsewhere. One single line should be enough:
ServicePointManager.SecurityProtocol := 3072;

This however does not grant me access to the server.


HttpWebRequest := WebRequest.Create(txtURLiLG);

ServicePointManager.SecurityProtocol := 3072; // 3072 = Tls12 (TLS 1.2)

HttpWebRequest.Timeout := 600000; // 10 minutes
HttpWebRequest.ReadWriteTimeout := 600000; // 10 minutes

HttpWebRequest.ContentType := 'text/xml;charset=utf-8';
HttpWebRequest.Method := 'POST';
SystemTextUTF8Encoding := SystemTextUTF8Encoding.UTF8Encoding();
Bytes := SystemTextUTF8Encoding.GetBytes(XMLDoc.InnerXml);
HttpWebRequest.ContentLength := Bytes.Length;
RequestStream := HttpWebRequest.GetRequestStream();
RequestStream.Write(Bytes, 0, Bytes.Length);
RequestStream.Close;


Do any of you have a hint setting securety protocol to TLS 1.2 in Dynamics NAV?

Thanks.

Best regards
Jan

Calling external https web services in AL

$
0
0
Hello,

I have the following code for consuming soap web services in AL.

RequestMessage.SetRequestUri(URL);
RequestMessage.Method('POST');
Content.GetHeaders(Headers);
Headers.Remove('Content-Type');
Headers.Add('Content-Type', ContentType);
Content.WriteFrom(XML_text);
RequestMessage.Content := Content;
WsHTTPClient.send(RequestMessage, ResponseMessage);
if not ResponseMessage.IsSuccessStatusCode() then
error(format(ResponseMessage.HttpStatusCode()) + ' , ' + ResponseMessage.ReasonPhrase());
if ResponseMessage.IsSuccessStatusCode() then
begin
ResponseMessage.Content().ReadAs(InStr);
while not instr.EOS() do begin
InStr.ReadText(ReadString);
OutString += ReadString;
end;

// do something with outstring

end
else
error(format(ResponseMessage.HttpStatusCode()));

It works ok for http web services but crashes on https.

Error from event log:

Type: System.Net.WebException
Status: SecureChannelFailure
Message: <ii>The request was aborted: Could not create SSL/TLS secure channel.</ii>
StackTrace:
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)

Do I need to change some ssl configuration on IIS or NAV server?

Thanks!

Show text when sales line fill more than one page

$
0
0
Hi everyone, I'm trying to create a label to show when my customer ledger entries fill more than one page. So if I have just one page this label will not be visible, but if I have a bunch of lines and two or more pages I want to have a label like "continue..." understand?

I have this in a invoice, made with a label but I can't figure out how this is shown ...

n0srzzsdwc7j.png

I can't find any code to show/hide the visibility of the textbox...

NAV auto report transformation (ART) service. Classic to RDLC

$
0
0
Hello NAV community,

We would like to present a new NAV Auto Report Transformation (ART) service. It allows the transformation process of old Classic reports to the new RDLC standard. You do not need any installations or specific automations/DLL, or licenses - everything is on the web-site. Just import an OLD report (TXT format), process and export RDLC report (TXT format).

Feel free to try it now. Now it is available under free limited usage till July 1st, 2018.
More information can be found here https://navisionupgrade.com

If you have any questions please do not hesitate to contact us via email: artservice@swp-group.com
Looking forward for fruitful cooperation and valuable feedbacks.

SWP-Group team.
Viewing all 10032 articles
Browse latest View live


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