Quantcast
Channel: Microsoft Dynamics NAV
Viewing all 64865 articles
Browse latest View live

Forum Post: Migrate Data from NAV 2017 to Extensions in Business Central On-Premise

$
0
0
Hi All, Can you please let us know how can we migrate the data from NAV 2017 to Extensions in Business Central On-Premise.

Forum Post: RE: Migrate Data from NAV 2017 to Extensions in Business Central On-Premise

$
0
0
Answered in the other forum (please don't suplicate posts if possibile). For a migration to D365BC on-premise, this can be done in different ways: - Configuration Packages (Rapidstart) - XMLPort - Import via ws - Direct import via SQL scripts

Forum Post: RE: Migrate Data from NAV 2017 to Extensions in Business Central On-Premise

Forum Post: Document Approval Via Email

$
0
0
Dear Sir, The approval system is configured in the NAV 2016 Database with Email Notification. The Email Notification carries Document Details. And now I want to add two Action buttons one for Approve & another for Reject in Email body. So that approver can take decision & update the Navision Data from there. If the Approver wants to reject the document he will click the Reject button or if he/she wants to approve then click the Approve button. These two buttons will serve the purpose without login the NAV System. How to do it? Please suggest if you've any idea. Subrata Bauri

Forum Post: RE: entering Note, or Link in Sales Order, via web services (OData / SOAP)

$
0
0
It is possible using SOAP, create a codeunit and write a function to write a note . Tested working : Publish the codeunit in Web Service : Call in Postman : Result in NAV : Sample code : [External] WriteSalesOrderNote(OrderNo : Code[20];Note : Text) SalesHeader.GET(SalesHeader."Document Type"::Order,OrderNo); RecordLink."Record ID" := SalesHeader.RECORDID; RecordLink.Type := RecordLink.Type::Note; TypeHelper.WriteRecordLinkNote(RecordLink,Note); RecordLink.Created := CREATEDATETIME(TODAY,TIME); RecordLink."User ID" := USERID; RecordLink.Company := COMPANYNAME; IF NOT RecordLink.INSERT THEN RecordLink.MODIFY; Name DataType Subtype Length TypeHelper Codeunit Type Helper RecordLink Record Record Link SalesHeader Record Sales Header

Forum Post: preview of word document in navision 16 like windows

$
0
0
Hi Community, I have a requirement in which on clicking the button of ribbon a preview of that document file should open in Navision itself instead it is opening outside like MS Word, Wordpad. Can You please suggest some solution.

Forum Post: RE: Error - Adjust Cost Item Entries report does not have a DataItem that uses the table (Table 27 Item) specified in the function SetTableView.

$
0
0
Hi Andrea Can u pls guide how the below line's work. CLEAR(AdjustCostItemEntries); AdjustCostItemEntries.InitializeRequest("No.", ''); Thanks

Forum Post: RE: Different safety stock amounts for different locations in Navision Classic 2009

$
0
0
Hi Alfredo, thank you. I forgot that there is of course a difference between an item and a SKU. Hopefully we can make this work now by filling in the correct parameters at the SKU-numbers. Robbin

Blog Post: Importing RapidStart packages with automation APIs demystified

$
0
0
Last week, I was working on the final bits of a release pipeline for Business Central in Azure DevOps and all that was left was to import a couple of RapidStart packages in an automated (PowerShell) fashion. The only (future-proof) automated way of doing this is by using the automation APIs as described here . Seems do-able, right…? For the ones who’re not into reading the documentation (like me :D), we’ll need to do 4 API calls to get the job done: – Create a record in the Configuration Package table – Upload the RapidStart package – Import the RapidStart package – Apply the RapidStart package Apart from the fact that we need to do 4 API calls, there’s some undocumented stuff going on behind the scenes that’s definitely worth mentioning. To be more specific, some of the API calls trigger asynchronous tasks that are executed by the task scheduler in Business Central at a later point in time, meaning that subsequent API calls will fail with a bad request status code if called directly. I’ll go through the 4 API calls one by one, but first, we need to understand why automation APIs are so important these days. P.S. all the code is available on my GitHub ! Automation APIs If I remember well, NAV 2013 was the first version that got delivered with automation tools, PowerShell cmdlets to be more precise. With almost every new NAV version we got a couple of new cmdlets, but this has slowly come to an end because of the introduction of the Business Central SaaS offering and C/SIDE’s retirement. In other words, it was time for something new and automation APIs are the only way to automate things for BC SaaS. Authentication I’m not going to talk about authentication in this blog, the way you authenticate depends on the type of environment you’re using. I’ll be using windows authentication and a local Docker container, for BC SaaS you’ll need to use OAuth or basic auth with a web service access key. Creating the Configuration Package record It all starts with creating a record in the configuration package table, if you import a package through the client this record is created for you but we’ll need to do it by hand. For all the API calls we need a company id, let’s retrieve a company first: Now that we have the company id, we can create the Configuration Package called ‘MyPackage’: Please note that I explicitly specify the ContentType parameter of the Invoke-RestMethod function, if you omit this parameter you’ll get the confusing error below: {“error”:{“code”:”BadRequest”,”message”:”Cannot create an instance of an interface.”}} Always make sure that the package code matches with the package code in your RapidStart file, otherwise the import and apply actions won’t work! Uploading the package This is where it becomes a little bit more tricky, the API call to upload the package will be finished before you can make the API call to import it, so we’ll need to give the service tier some time to process the package. Since there’s no way to retrieve the progress of the upload we have no other option than to wait for a couple of seconds. The package will be uploaded to the content field in the Tenant Config. Package File table so that it can be retrieved during import. The API call looks like this: Importing the package After we’ve given the upload some time to process we can make the call to import the package, the import takes the package from the Tenant Config. Package File table and fills the RapidStart related tables so that everything’s ready for the apply step. Here’s the API call: The annoying this is that this API call seems a bit unstable, there are situations where the API returns an error (can’t repro it at the moment) but the import is started anyways. Calling the API twice with -ErrorAction SilentlyContinue did the job for me. If the import is already started by the first invocation the API will return an error, which is fine. The API call doesn’t perform the import itself, it only creates a scheduled task that takes care of the import and then returns a success status code. Importing a package might take a while (depends on package size) so we’ll need to know when it’s finished before we invoke the apply action. The only way (AFAIK) is to poll the package entity until the ImportStatus has reached ‘Completed’ or ‘Error’. To not overload the service tier with unnecessary requests, it’s best to only poll every X number of seconds and implement a timeout so that you don’t end up with an infinite loop. Applying the package The call to apply the package is almost the same as the call to import the package, it’s just a different bound action we need to call: Applying happens asynchronously as well, so we’ll need to use the polling mechanism again to now monitor the ApplyStatus of the package instead of the ImportStatus. If the import fails, you have no idea about the cause, you only know the number of errors (numberOfErrors property on the package entity) that occurred which forces you to log in to the system to figure out what went wrong. In my opinion, it would be a great enhancement to also return the error details so actions can be taken in an automated matter. All the code is available on my GitHub , I didn’t take the time to write nice and clean PowerShell functions and wrap them in a module but feel free to reuse the things you need!

Forum Post: How to iterate over JSON array in Navison 2018 using C/AL

$
0
0
Hi All, I need to iterate over JSONArray in Nav2018, following is the JSON Array snippet. JSON Data: { "return": [ { "id": 1, "first_name": "aaa", "last_name": "ddd", }, { "id": 2, "first_name": "bbb", "last_name": "eee", }, { "id": 3, "first_name": "ccc", "last_name": "ttt", } ] } Here I need to insert each "id" data like id, first_name,last_name as a row in the database table. Thanks in advance.

Forum Post: RE: NAV 2018 Web Client always fails after some days

$
0
0
How you manage to run multiple cersions / builds of the web client on the same IIS ? I didnt get it...

Forum Post: RE: Workflow approval purchase order NAV add lines after approved

$
0
0
Adding the line will trigger the approval again. There is no other way around this. Imagine if someone open the PO and adding 100 items in it without approval. Anything related to quantity or amount will trigger the approval.

Forum Post: RE: Error - Adjust Cost Item Entries report does not have a DataItem that uses the table (Table 27 Item) specified in the function SetTableView.

$
0
0
The CLEAR(AdjustCostItemEntries) will clear any variables in that report. The AdjustCostItemEntries.InitializeRequest(ItemNoFilter,ItemCategoryFilter) use the Item No filter and Item Category filter to filter the items.

Forum Post: Inserting field to G/L Entry

$
0
0
Hi, I'm trying to post Sales order and I want one of the fields in sales order posted to the G/L entry. I don't see reference for the General Journal Line table (in PostGLAndCustomer function) in codeunit 80 to assign that field value from sales order table. How can we assign sales order field value to the general journal line field?

Forum Post: RE: entering Note, or Link in Sales Order, via web services (OData / SOAP)

$
0
0
I checked using OData is also possible : No additional field but with new page workaround is you need to create page with SourceTableTemporary set to yes , and put the code to write the note inside OnModifyRecord. (only need additional page) no additional page but with new field you can create additional field for the note in sales header table , then add code to transfer the value from this field to Note (record link) ,put the code to write the note inside OnModifyRecord. Sample using page with temporary table and using "Ship-to Address" field to transfer the note text : Call in postman : Result in NAV OnModifyRecord() : Boolean SalesHeader.GET(SalesHeader."Document Type"::Order,Rec."No."); RecordLink."Record ID" := SalesHeader.RECORDID; RecordLink.Type := RecordLink.Type::Note; TypeHelper.WriteRecordLinkNote(RecordLink,Rec."Ship-to Address"); RecordLink.Created := CREATEDATETIME(TODAY,TIME); RecordLink."User ID" := USERID; RecordLink.Description := Rec."Ship-to Address"; RecordLink.Company := COMPANYNAME; IF NOT RecordLink.INSERT THEN RecordLink.MODIFY;

Forum Post: RE: Inserting field to G/L Entry

$
0
0
You need to subscribe to table 81 to function "OnAfterCopyGenJnlLineFromSalesHeader(SalesHeader,Rec);"

Forum Post: RE: How to iterate over JSON array in Navison 2018 using C/AL

$
0
0
Hi, you can use codeunit JSONManagement to do that . Sample code : //Create JSONArray String JSONManagement.InitializeFromString(JsonString); JSONManagement.GetJSONObject(JObject); ArrayString := JObject.SelectToken('return').ToString; //Read and Parse JSONArray CLEAR(JSONManagement); CLEAR(JObject); JSONManagement.InitializeCollection(ArrayString); JSONManagement.GetJsonArray(JSONArray); //loop and can do insert FOREACH JObject IN JSONArray DO BEGIN MESSAGE('%1 %2 %3', JObject.GetValue('id') , JObject.GetValue('first_name'), JObject.GetValue('last_name') ); END; Name DataType Subtype Length JSONManagement Codeunit JSON Management JSONArray DotNet Newtonsoft.Json.Linq.JArray.'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' JObject DotNet Newtonsoft.Json.Linq.JObject.'Newtonsoft.Json' ArrayString Text

Forum Post: worksheet requisition

$
0
0
hi all, just want to ask if OPEN Purchase Orders and Transfer Orders are recognized/considered on Calculate Worksheet Requisition? thanks.

Forum Post: RE: Which is the most recommendable NAV to Magento Connector

$
0
0
Hello, I know its old thread but if any one looking for above recommendation, Following NAV magento integration service helps you to integrate your ERP system to magento and additional eCommerce marketplace systems such as eBay, Amazon. dynamics.folio3.com/dynamics-nav-magento-integration Appseconnect also connect your ERP to third party so that you can get the benefit of sync the data easily and get automatic update such as get the data sync, update your ERP, automatic create invoice, update the logistic, update store info automatically so there are alot's of activity you can perform with APPSeCONNECT easily with a short of training.

Forum Post: RE: How to iterate over JSON array in Navison 2018 using C/AL

Viewing all 64865 articles
Browse latest View live


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