Quantcast
Channel: Dynamics 365 Business Central/NAV User Group
Viewing all 11285 articles
Browse latest View live

Forum Post: RE: Your extension is incompatible with an upcoming release of Microsoft Dynamics 365 Business Central

$
0
0
In VS code the version is correct. THe problem is that the tenant is not upgraded yet....

Forum Post: Flow data from Item journal to tracking specification table

$
0
0
Dear All, i have added two new fields (Mfg Date and Expiry Date) in item journal table. i have added code in Codeunit 22 (Item Jnl.-Post Line) to Flow the data from item journal to item leger entry. Same i have to flow data from item journal to tracking specification table, but i not getting where to write the code. kindly Suggest.

Forum Post: Data upgrade from Business central 14 to Business Central 15 On premise

$
0
0
Hi everyone, I'm currently facing an urgent challenge which is upgrading data from Business central 14 to Business Central 15 On premise, usually with NAV we used to convert the base for example with opening it with the newer version in the developement environment. Now I find myself stuck because we don't have the developement environment anymore. Please can someone enlighten me with how to upgrade my data base to business central 15 on premise. Thanks in advance.

Forum Post: How attach files without tempblob record?

$
0
0
I have an extension to attach files into a record, and of course, withe the new version I get the error, and the solutons proposed: Error: Argument 1: cannot convert from 'Record TempBlob' to 'var Codeunit "Temp Blob"' Solution: Use codeunit 4100 "Temp Blob" API instead of the record API. Im' trying to find the solution, but I don't get any. I've found this: https://community.dynamics.com/business/b/dynamics365businesscloudfronts/posts/how-to-attach-documents-to-any-record-of-any-table-in-business-central But they use the tempblob record, so I can't use that. I've openned the baseApp to see how it's done inthe standard, but I cannot use that way either: Which is the corerct way to create a extension for cloud in the latest release to attach files? Thank you very much!

Blog Post: Dynamics 365 Business Central on-premise Wave 2: changing license

$
0
0
I was sure this was an obvious topic until today, but after receiving so many desperate questions from partners that are unable to change the license for an on-premise Dynamics 365 Business Central Wave 2 database for development purposes, I’ve decided to spent few minutes for sharing this. When you install Dynamics 365 Business Central on-premise Wave 2 (or version 15) release, you’ll see that the setup permits you to select the following things: and when installed you have the following 3 applications: As you can see, there’s no more the classic CSIDE Development Environment but now you have only the web client. In the previous versions (where the Development Environment was still available) you could change the license by going to Tool|License Information|Change and then select your developer license. And now? Now you cannot do this and the work for “switching” license from a customer license to a developer license is a bit more tricky. What you can do is: Create two server instances that points to the same database by using New-NAVServerInstance cmdlet (for example PROD as the production service and DEV as the development service only used by the partner). Leave the DEV server inactive and activate it only when you need it. Create two web client instances by using the New-NAVWebServerInstance cmdlet that points to PROD and DEV respectively (different urls) Import the customer license by using the following cmdlet: Import-NAVServerLicense 'MicrosoftDynamicsNavServer$ PROD ' -LicenseData ([Byte[]]$(Get-Content -Path "c:\YourLicenseFolder\ CustomerLicenseFile.flf " -Encoding Byte)) When you want to change the license (temporary change for development purposes): 4. Import the partner license by using the DEV server instance: Import-NAVServerLicense 'MicrosoftDynamicsNavServer$ DEV ' -LicenseData ([Byte[]]$(Get-Content -Path "c:\YourLicenseFolder\ PartnerLicenseFile.flf " -Encoding Byte)) 5. Start the DEV service and connect with your partner account to the DEV endpoint 6. Import the customer license to the PROD endpoint with the cmdlet described at point 3. In this way, the DEV endpoint runs with the partner license (temporary loaded) and the PROD endpoint runs with the customer license (service caches the license). This is necessary because the I mport-NAVServerLicense cmdlet imports the license in the database. You can do your work and then stop the DEV endpoint when finished. Another possible option that permits you to avoid this “license switch” is to use Runtime Packages . A Runtime Package permits you to distribute the final artifacts of your extension without distributing your AL code and (expecially) permits you to install the extension on a server without using the developer license (the license is checked only on the server where the runtime package is generated). To create a Runtime Package for your extension, you can use the following cmdlet: Get-NAVAppRuntimePackage -ServerInstance YourServerInstance -AppName 'Your App Name' -Version 1.0.0.0 -ExtensionPath 'Path of your .app file' When you have the runtime package, you can then publish the extension with Publish-NAVApp and Install-NAVApp cmdlets. The only limitation is that the extension’s debugging experience is poor, because source code is not available.

Forum Post: Large Text field in Page Extension

$
0
0
Hi, I'm trying to add a large Text[] field to a table extension in Business Central v13.0 The Text field should display a "large" multi-line text box in the UI where the user could type text. I was able to create a LargeText Variable on a page extension originally and make it multi-line without any issue other than the fact I cannot control the height of the box... When I decided to add a field to my table so that the data entered in the field could be saved, i ran into an issue. VSCode would only allow me to declare a Text[250] as the largest text field. How can overcome this? Can I display a bigger (taller) text box in the modern client? Would blob be my next avenue and convert from blob to text and text to blob so that I am not limited to 250 characters? I need 1000-4000 on average. Thanks Yann

Forum Post: RE: Large Text field in Page Extension

$
0
0
AL experience is no different from C/AL in regard of text table fields. FIeld length is limited to 250 symbols, and if you need to store larger values, you have to create a blob field and read it into a Text variable.

Forum Post: RE: Data upgrade from Business central 14 to Business Central 15 On premise

$
0
0
Even in older versions you could use the PowerShell cmdlet Invoke-NavDatabaseConversion. Now it seems to be the only remaining option. https://docs.microsoft.com/en-us/powershell/module/microsoft.dynamics.nav.ide/invoke-navdatabaseconversion?view=businesscentral-ps

Forum Post: RE: Flow data from Item journal to tracking specification table

$
0
0
Hi, Before trying to answer your question, it's good to understand why you want to move anything from journal lines to tracking specification in the first place. Because normal data flow is the other way round: from Reservation Entry to Tracking Specification and after that to Item Journal Line. And by the way, why are you creating a custom field for expiration date instead of using the standard one?

Forum Post: RE: Error: Web service using web service

$
0
0
Does your function ICSock_CALL open any GUI (PAGE.RUN, CONFIRM, MESSAGE, etc)? This error message is what you usually get when a GUI element is called in a session which does not interact with the user interface. In web services GUI is not allowed, so if you uncomment the statement IF NOT GUIALLOWED THEN EXIT, the subsequent code is not executed.

Forum Post: RE: Flow data from Item journal to tracking specification table

$
0
0
Actually i have Changed my logic now, i am entering the data in item tracking line which flow item ledger entry. I have added two additional fields (Manufacturing and Expiry Date) in tables 336 – Tracking Specification 337 – Reservation Entry 338 - Entry Summary 83 – Item Journal Line 32 – Item Ledger Entry My data is properly flowing in tables except in the table 338 - Entry Summary Table.

Forum Post: RE: Error: Web service using web service

$
0
0
Hi Alexander. I've solved the issue using DOTNET variabels instead automations: ICStock_CALL(pCodprod : Code[35];pCantidad : Decimal) CabVenta : Code[20] ICConfiguration.GET; ICURL := ICConfiguration."IC URL"; IF ISNULL(DotNetXmlDoc) THEN DotNetXmlDoc := DotNetXmlDoc.DOMDocumentClass; IF ISNULL(DotNetXmlHttp) THEN DotNetXmlHttp := DotNetXmlHttp.XMLHTTPRequestClass; DotNetXmlHttp.open('POST',ICURL,0,'betea','onM1crosoft1'); DotNetXmlHttp.setRequestHeader('Content-Type','text/xml; charset=utf-8'); DotNetXmlHttp.setRequestHeader('SOAPAction','ICStock_FUN'); DotNetXmlHttp.send(' '+ ' '+ ' '+ ' '+ ' '+ ' '+pCodprod+' '+ ' '+FORMAT(pCantidad)+' '+ ' '+ ' '+ ' ');

Forum Post: RE: Large Text field in Page Extension

$
0
0
This is what I ended up doing. I created a BLOB field in the database called "Job Description Blob" field(40001; "Job Description Blob"; Blob) { } In the page Extension, I created a field that is tied to a variable called "Job Description" Within the field, I created a OnValidate trigger that calls a procedure called SetJobDescriptionBlobAsText This takes what you have entered in the textbox field and updates the database. field("Job Description"; "Job Description") { MultiLine = true; Width = 200; trigger OnValidate() begin SetJobDescriptionBlobAsText("Job Description"); end; } The variable called "Job Description" gets created as Text type. "Job Description": Text ; The definition for the SetJobDescriptionBlobAsText looks like this PROCEDURE SetJobDescriptionBlobAsText("Job Description": Text); VAR TempBlob: Record 99008535 TEMPORARY; BEGIN CLEAR("Job Description Blob"); IF "Job Description" = '' THEN EXIT; TempBlob.Blob := "Job Description Blob"; TempBlob.WriteAsText("Job Description", TEXTENCODING::Windows); "Job Description Blob" := TempBlob.Blob; MODIFY; END; I have created also another Procedure called GetJobDescriptionBlobAsText that reads the database blob and converts it into text. This fills the text field via the page Trigger called OnAfterGetRecord procedure GetJobDescriptionBlobAsText(): Text; VAR TempBlob: Record 99008535 TEMPORARY; CR: Text[1]; BEGIN CALCFIELDS("Job Description Blob"); IF NOT "Job Description Blob".HASVALUE THEN EXIT(''); CR[1] := 10; TempBlob.Blob := "Job Description Blob"; EXIT(TempBlob.ReadAsText(CR, TEXTENCODING::Windows)); end; OnAfterGetRecord trigger trigger OnAfterGetRecord() begin "Job Description" := GetJobDescriptionBlobAsText(); end; And that's it. I hope this helps anyone trying to do something similar. I had to do a fair bit of research as I am pretty new to AL. My next step would be to incorporate a Javascript Addin so that I can control the size of the text box as currently, on the modern client, even though I can type a novel in the textbox, i only ever shows 3 rows at a time. Thanks again Alexander for the quick reply. Always appreciated. Yann

Forum Post: Extension for send a jSon to a webService

$
0
0
Hi everyone, I'm creating a extension for a cloud installation to send a jSon to a external webService. The code is like this: procedure SendContacts(var pContactTxt: text) var lMensaje: Text; begin Content.Clear(); Content.GetHeaders(Headers); lMensaje := pContactTxt; Content.WriteFrom(lMensaje); Headers.Remove('Content-Type'); Headers.Remove('Charset'); Headers.Add('Content-Type', 'application/json'); Headers.Add('Charset', 'utf-8'); httpRequest.Content(Content); httpRequest.Method('POST'); url := 'http://xxxxxx.com/webservice/create-contact'; client.Clear(); Client.SetBaseAddress(url); if not Client.Send(httpRequest, ResponseMessage) then error('Llamada incorrecta'); if not ResponseMessage.IsSuccessStatusCode then Error('El WS ha devuelto el siguiente error:\' + 'Status Code : %1\' + 'Descripcion: %2', ResponseMessage.HttpStatusCode, ResponseMessage.ReasonPhrase); ResponseMessage.Content.ReadAs(ResponseText); Message('Contacto(s) enviados a Gremious'); end; If I use "RequestBin" for testing, you can see that the message seems to be correct: And if I copy the request content, adn send it to the real WebServiche through Postman, we can see in the WebService's log that the message arrives correctly: But if I send directly to the webService from BC, I get this error: And this can be seen into the webService log: Seems that the jSOn is sent as an array, and the webService isn't capable to process it. Am I sending he content incorrectly? Thank you all

Blog Post: Landing to Directions EMEA 2019…

$
0
0
This is the meeting’s week for all the european Microsoft Dynamics 365 Business Central partners (and not only them I think) and Vienna for the second time hosts a great 3 days of conference. This is the event to attend to know more about the Microsoft’s strategy for Dynamics 365 Business Central (present and future) and for making interactions with all the great partner’s community. My personal recommendation for the event to all of you: come to Directions EMEA for learning but also for providing constructive feedbacks to Microsoft . Microsoft is here with all the product team and feedbacks to them are a must in order to improve the product in the present and in the future. Share your opinions, your pros and cons, what your customers thinks and wants. They’re here for listening. To all the Italian people at the conference: together with Microsoft Italy we’re planning a series of technical events for the next months to come (more news in the upcoming months). Please share what are the topics where you would like to know more or where do you think there’s a big need to go in-depth, we want to listen your needs in order to better plan the next events. Hoping to know many of you in person in the next days… have a safe trip and see you tomorrow!

Forum Post: RE: Extension for send a jSon to a webService

$
0
0
Which content type are you setting when sending the message from Postman? I suppose that it should be text/plain, not application/json.

Forum Post: RE: Extension for send a jSon to a webService

$
0
0
I'm sending with "form-data" I've changed in the extension to: Content.Clear(); Content.GetHeaders(Headers); lMensaje := pContactTxt; Content.WriteFrom(lMensaje); Headers.Remove('Content-Type'); Headers.Remove('Charset'); Headers.Add('Content-Type', 'multipart/form-data'); Headers.Add('Charset', 'utf-8'); httpRequest.Content(Content); httpRequest.Method('POST'); And the log form the webService: In this case not even an array arrives....

Forum Post: RE: Extension for send a jSon to a webService

$
0
0
And did you try to send it as plain text? What is the outcome in this case?

Forum Post: RE: Extension for send a jSon to a webService

$
0
0
HI, In this way: Content.Clear(); Content.GetHeaders(Headers); lMensaje := pContactTxt; Content.WriteFrom(lMensaje); Headers.Remove('Content-Type'); Headers.Remove('Charset'); Headers.Add('Content-Type', 'text/plain'); Headers.Add('Charset', 'utf-8'); httpRequest.Content(Content); httpRequest.Method('POST'); I get this error: Basically the same...

Blog Post: Dynamics 365 Business Central on-premise Wave 2: how to create databases and perform technical upgrades

$
0
0
I’ve explained few days ago how to change a license from customer’s one to partner’s one when working with Dynamics 365 Business Central Wave 2 on-premise . This more tricky process occours mainly because now you don’t have the Development Environment available anymore. Another problem that you could have strictly related to this is the following: how can I create a new Dynamics 365 Business Central Wave 2 database now? For creating a new database, now Powershell is again your friend. To create a new Dynamics 365 Business Central database, you need to use the NAV- NAVApplicationDatabase cmdlet. The command to execute is normally the following: New-NAVApplicationDatabase -DatabaseServer YOURSERVER -DatabaseName DATABASE_NAME -DatabaseLocation YOUR_DB_FILES_LOCATION_PATH You can also set the Collation by using the -Collation switch (default is Latin1_General_100_CS_AS). With -DatabaseLocation you specify the path where data files and log files will be created. What about the technical upgrade ? Previously, with Development Environment you could open the database with a new version of the DEV Enviroment and perform a technical upgrade (aka a database conversion) to the new version. And now? Now you can do that by using the Invoke-NAVApplicationDatabaseConversion cmdlet: Invoke-NAVApplicationDatabaseConversion -DatabaseName DATABASE_NAME -DatabaseServer YOURSERVER This command starts a technical upgrade to a database called DATABASE_NAME on the server called YOURSERVER.
Viewing all 11285 articles
Browse latest View live