Thanks Imran, yes I did and faced the same error. Do you know how they use the "From bin code', 'To bin code" in the whse. physical inventory journal?
↧
Forum Post: RE: How to upload excel upload to whse.physical inventory journal
↧
Forum Post: RE: How to upload excel upload to whse.physical inventory journal
those are used to move an item from bin code to other bin code . The phys. inventory field is it processed first and then others ?
↧
↧
Forum Post: RE: Create a Freight Calculator Page in AL - Dynamics 365 Business Central
If you used table fields for controls, TableRelation property could help you filter the dropdown list - it can be extended to apply a filter from another field of the same table. But since it's all variables, TableRelation will not work, it's not so flexible to pick filter values from variables. In this case, you'll have to write code for the OnLookup trigger of the control. For example, this is how it would work for standard tables "Country/Region" and "Post Code". Btw, take a look at these tables - probably they can help you normalize the data structure. page 50102 "Address Sample" { PageType = Card; layout { area(content) { group(AddressGroup) { field(CountryCodeControl;CountryCode) { Caption = 'Country'; TableRelation = "Country/Region"; } field(CityControl;City) { Caption = 'City'; trigger OnLookup(var Text : Text) : Boolean; var PostCode: Record "Post Code"; PostCodesList: Page "Post Codes"; LookupConfirmed: Boolean; begin if CountryCode = '' then exit(false); PostCode.FilterGroup(2); PostCode.SetRange("Country/Region Code",CountryCode); PostCode.FilterGroup(0); PostCodesList.LookupMode(true); PostCodesList.SetTableView(PostCode); LookupConfirmed := PostCodesList.RunModal() = "Action"::LookupOK; if LookupConfirmed then begin PostCodesList.GetRecord(PostCode); Text := PostCode.City; end; exit(LookupConfirmed); end; } } } } var CountryCode: Code[10]; City: Text[30]; } Regarding filtergroups and functions like LookupMode and SetTableView, you can read related MSDN articles on older versions on NAV - functions are the same. There is no way to write SQL queries in AL. There is a substitute for SQL called query object: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-query-object But in most cases there is no benifit in query compared to AL code. It is only recommended if you need to join large tables where performance is critical.
↧
Forum Post: VS Code and OnPrem connection error
Hi All, While trying to create new extension in my existing VS Code environment, I am getting following error while generating menifest. VS Code detail is : AL Language Information : Name: AL Language Id: ms-dynamics-smb.al Description: AL development tools for Dynamics 365 Business Central Version: 3.0.121490 Publisher: Microsoft VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-dynamics-smb.al What is this error? and how to resolved it? Thanks, Shraddha
↧
Forum Post: RE: VS Code and OnPrem connection error
Hi All, Above error goes automatically, now getting below error. Thanks in advance.
↧
↧
Blog Post: Dynamics 365 Business Central and per-tenant extensions: check page control names between platform upgrades
I’ve talked a lot in the past about pros and cons of per-tenant extensions (PTE) in Dynamics 365 Business Central. Despite Microsoft’s guidance (use AppSource) this is actually the most common way for partners to deploy their extensions on a SaaS environment and this is the recommended way for developing specific customizations for a customer tenant. Unfortunately, the partner’s live with the per-tenant extensions is not so easy nowadays because (in my personal opinion) Microsoft has an internal process for managing PTEs that must be absolutely rethinked. I’ve talked in the past about the main noisy problem with PTEs, but there are other aspects that can cause problems on your tenants. The problem I want to talk here today is a very noisy problem that I’ve personally experienced this morning on a customer’s SaaS tenant. I have an extension that adds some fields on the Item List page. As a best practice, if possible I always suggest to add your new fields to a standard list page as last fields of the repeater control on that page . Our customer has actually an online tenant with platform 13.5 and the new field was added in the following pageextension object: pageextension 50301 ItemListExt_EID extends "Item List" { layout { addlast( Item ) { field("Item with Barcodes"; "Item with Barcodes") { ApplicationArea = All; Editable = false; Style = Attention; StyleExpr = attentionStyle; } } } } Today I’ve received an email from Microsoft (remember to always add your address in the tenant’s Admin Center email recipients) that says this: The XXX extension that is installed in the Dynamics 365 Business Central tenant for YYY is not compatible with version 14.0.29537.31665. The compatibility issue must be resolved before the tenant for which the extension is installed can be successfully updated to version 14.0.29537.31665. Error AL0270: The control ‘Item’ is not found in the target Why this problem occours? Because I’ve added the Item with Barcodes field (my custom field) as LAST control of the standard repeater control on the Item List page and this repeater control on platform 13.5 was called Item: On platform 14, Microsoft has renamed the repeater control and this is now called Control1 : Despite the step backward (calling a control like ControlXXX on a page is totally without sense in AL!), what do you have to do now? You have to download the symbols for the new build and fix your app. For doing this, you have essentially two ways: Create a local docker container with the latest official build Directly from the online tenant you can create a secondary sandbox with the future version and fix your app by downloading symbols from that sandbox The fix was simple, just change the repeater control name: pageextension 50301 ItemListExt_EID extends "Item List" { layout { addlast( Control1 ) { field("Item with Barcodes"; "Item with Barcodes") { ApplicationArea = All; Editable = false; Style = Attention; StyleExpr = attentionStyle; } } } } The problem appears if you want to directly upload this extension in the default sandbox environment for releasing the app to your users for testing. Here, platform is again 13.5 and you don’t have Control1 in the Item List page. If you want to do a fix that permits an immediate publising of this extension for the CURRENT release and that will be compatible for the future release, in this case you need to avoid using ADDLAST(RepeaterName) and add the field AFTER a standard field ( ADDAFTER(FieldName) ). Instead, if you want to use ADDLAST(RepeaterName) and upload the fixed extension to the production environment and be ready for the future upgrade, remember that: You need to compile the extension for the new build (new symbols) Upload the extension for the NEXT MINOR version (not for the Current version as normally you’re doing for every extension): When you deploy an .app file for the next version, the extension will be queued up and it will be deployed as part of the customer’s tenant upgrade to the next version (so not immediately). These are noisy aspect, I agree… but actually the platform could have also control names changements between minor releases and you should be aware of that and handle them accordingly.
↧
Forum Post: XMLPort- Modify record just after export
I'm exporting payment journal entries by using XmlPort. Just after exporting the record, I need to set the value of 'Exported to Payment File' field to true. How can I accomplish this?
↧
Forum Post: RE: XMLPort- Modify record just after export
You need to put the code in the trigger to set the value to exported to payment file
↧
Forum Post: RE: Create a Freight Calculator Page in AL - Dynamics 365 Business Central
Thanks... Once again, very helpful! I modified your code so that when I choose a Destination Province, the Destination City shows the Rate List with only the records that are in that province. Is there a way to only display the list of Cities? At the moment, it shows all the columns from my rates table... I would like it to behave more like a drop down... Because I don't know how to do it in AL, at the moment, it looks like the easiest way to achieve what I'm look for would be to have multiple tables. One for Origin City, one for Destination City, one for Destination Province, another for Service Type and yet another for the actual rates, so that I can place a filter based on the selected fields. The other option would be to use Query Option which can get expensive as we have to pay for them...
↧
↧
Forum Post: RE: Create a Freight Calculator Page in AL - Dynamics 365 Business Central
It is good to have separate tables for cities, provinces and services types - just in memory of dr. Edgar Codd. Then the table containing service rates should store city, province, etc. as foreign keys. Still, it's possible to show or hide page fields dynamically: layout { area(content) { field(ItemCodeControl;ItemCode) { TableRelation = Item; } field(ItemNameControl;ItemDescription) { Visible = IsDescriptionVisible; } } } procedure ShowFields(FieldsVisible: Boolean); begin IsDescriptionVisible := FieldsVisible; end; var ItemCode: Code[20]; ItemDescription: Text[100]; IsDescriptionVisible: Boolean; Property "Visible" controls visibility of a field. You can bind a variable to its value and add a global function to change the value. Then call this function from the OnLookup trigger. But if you need to do tricks like this, it means that the table is not even in 2NF and should be normalized.
↧
Forum Post: RE: MRP in planning worksheet
In Manufacturing Setup, select "Combined MPS/MRP calculation". This will enable you to run both direct and indirect demand in the Planning Worksheet in one go.
↧
Forum Post: RE: Create a Freight Calculator Page in AL - Dynamics 365 Business Central
I'm not sure I understand your last example. But I found something called Option Fields where I define a var of Type Option and associate the field to this variable and I'm now able to define the OptionCaption for the field. The result is a drop down. field(DestProvinceVar; DestProvinceVar) { Caption = 'Destination Province'; OptionCaption = 'AB, BC,MB,NB,NF,NS,NT,ON,PE,QC,SK'; } Unfortunately I haven't found a way to make my list dynamic. I wrote a procedure in a CodeUnit that gets the distinct Provinces and another one that gets the Cities, based on the selected provinces but I cannot find a way to use their return value. I cannot return a LIst of [Text] from the procedure. I converted one to a TextBuilder which should be comma separated but I cannot convert that to a String... Thanks Yann
↧
Forum Post: RE: get files from sharepoint to Dynamics NAV
Thanks for your reply. I am working on BC on-premise version. I did create a new API page object, and it shows up on the "API Web Service" table. But the thing is that i still can't find this newly created API from the Flow action. I was hoping to get files from sharepoint to the table field BLOB that connected to the API. Btw i selected this approach because all my files are stored on sharepoint and i need to use them for importing in BC, and i can't find another way to do it.
↧
↧
Forum Post: Nav License
Hi all. i am currently using Nav 13 in my company and we have purchased a developer license for the same, but somebody from our team gave the license file to a juniour level member. can you please suggest that how can i bar anyone else except from me to use that license in development environment. nobody should be able to open any cal code whether it is a report, table , query anything.
↧
Forum Post: RE: Nav License
In order to use the Licensefile it has to be installed - So it is a matter of permissions. Your Junior Level member (whatever that is) should simple not be a SUPER user...
↧
Forum Post: RE: How to upload excel upload to whse.physical inventory journal
I did something like that a few years ago. Rapid start will not work! I remember it really was a challenge. The only way I where able to get it working correctly, was to start by running the "create physical inventory journal", where it calculated the expected quantities. Then I updated it with the data (in my case from an XML file) that I had stored in a buffer table (you could use the excel buffer). If there where items not in NAV or without Lot No. (where required), then it was inserted, but marked as error. It needs to run this job first, because what you're posting is not really the physical inventory journal, but the difference between calculated and physical inventory.
↧
Forum Post: RE: MRP in planning worksheet
yes it worked with combined MPS/MRP calculation , but the only the MRP calculation since I have production order .
↧
↧
Comment on Custom API and PowerApps
VSCode is a blast to work with, I fully agree. And the more you use the more you learn how strong it really is. And how you can extend it, i.e. with Waldo's or one of the many other Extensions for VSCode. Not only the NAV/BC specific ones are interesting, all the code I write is spell-checked by a VSCode extension. :)
↧
Forum Post: Convert Text value from Unicode (NAV 2018) to ANSI (NAV 2009 R2 Classis Client)
Hi All. I need your help with the string encoding for the Text variable in the NAV 2018 (and BC) to ANSI (If I remember correctly MS Dynamics NAV 2009 R2 supports ANSI only). The start point for the issue - I need to generate the barcode (based on old font) and in the NAV 2018 I received the string " Õ+0"!|ÖEW·* (Ö9#3· ¬Mà " (after the procedure of encoding). But in the NAV 2009 I had another string - " Ò+0"!|ÍEWÌ* (Í9#3Ì ÈMÓ ". I think the problem is in the encoding - it has changed from ANSI to UTF8 (it was for NAV2016, but I don't know about NAV2018 and BC). Do you have any ideas about how to do it in right way? Thank you in advance for any help. P.S. I have 1 more point now - maybe I need to convert each symbol from the string, but not full text after conversion? But I have the open question again - how to convert 1 char|string[i] only
↧
Forum Post: how to globally update posting periods via sql script in NAV 5.0
A new client was hit by ransomware about a month ago, and their IT director had left shortly before that. The NAV environment was then reconstructed. The client had called me in for a SQL DBA type role, not as a NAV specialist. But now I am being asked to solve NAV specific problems and I am trying to get up to speed as quickly as possible. I have been told that there was a sql script that ran automatically to update posting periods at the end of the month, but it was lost after the ransomware hit, and only the IT director knew the details about it. There are several hundred users and about 15 companies. If I don't get this done for them today, then the ERP manager will have to do it manually early tomorrow, which he says is a very tedious task. It seems to me that this should be a simple SQL update against the date columns in a NAV table. What table corresponds to users / posting periods? Or is there another way to do this automatically. Thanks
↧