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

Forum Post: how to add a entry in G/L Entries Preview in Preview Posting. progmatically

$
0
0
Hi guys Currently I'm modifying the G/L posting Preview(115) Page, In Which I was required to add my customized Line of information called WHT Entry in the G/L Entry Row in the G/L Entry Posting Preview. in my Cash receipt Journal. this only appears when my Cash Receipt Journal line Document Type is Invoice . thus I am Required that this should appear even if the Document Type on my Cash Receipt Journal Line is Payment. Do you guys have an Idea on how to get this WHT Entry to add in the G/L Entry - Related entries. or what codeunit or page or table should I check out to add my customized Entry WHT Entry to the G/L Entry Count? as you can see in the screenshot my G/L Entry Count is 2. Since I have WHT Entry it should be inside the G/L Entry Count. By the way. I'm using Dynamics NAV 2018 11.0.20783.0 Thanks In Advance! Cheers!

Forum Post: sum of value in another field

$
0
0
hi all!!! I would like to know if there is a possible way to add up a single field in another field. for e.g if I have a decimal field 'A' and a decimal field 'B'. If 'A' has value 30 in it 'B' should also have the value 30, if I overwrite 'A' with 50 it should sum up 30 and 50 and field 'B' should show the value 80 in it. Basically, it should sum all the values that are being written in the field 'A'. Thanks in advance.

Blog Post: A german introduction to Windows Containers

$
0
0
I had the honor to speak about Windows Containers at the Cloud & Datacenter Conference Germany . Not a large conference, but very well organized with a clear focus and as far as I had the chance to talk to participants, a very satisfied audience. For the first time this year they recorded the sessions... Read the full text.

Blog Post: Dynamics 365 Business Central Training Session in Chennai, India

$
0
0
Delivered another Dynamics 365 Business Central 2 days in-class training for Korcomptenz at Chennai on June 16 th and 25 th , 2019. Korcomptenz has a very energetic NAV (now D365 BC) development team and I enjoyed providing them this training. Thank you all. I hope you enjoyed the session too. If you need Dynamics 365 Business Central training in your office/location then please contact me at pmohanakrishna@hotmail.com.

Forum Post: Error creating purchase orders

$
0
0
Hi everyone, I'm trying to make an easy development to create purchase orders with the aim of having covered the safety stock of the items into a location. The code is like this: lPedidoGenerado := FALSE; lCodPedido := ''; lLineaPedido := 0; lVendorCode:=''; lItem.RESET; lItem.SETCURRENTKEY("Vendor No."); lItem.SETFILTER("Safety Stock Quantity",'>0'); lItem.SETRANGE(Blocked,FALSE); lItem.SETRANGE(Type, lItem.Type::Inventory); IF lItem.FINDSET THEN REPEAT lVendor.RESET; IF lVendor.GET(lItem."Vendor No.") THEN IF lVendor."Location Code" = 'ALM01' THEN BEGIN IF lVendorCode <> lItem."Vendor No." THEN BEGIN COMMIT; lVendorCode := lItem."Vendor No."; lPedidoGenerado := FALSE; lPurchaseHeader.INIT; lPurchaseHeader.RESET; END; lItem.CALCFIELDS("Qty. on Purch. Order"); lItem.CALCFIELDS("Qty. on Sales Order"); //lQtyOnPurchase := lItem."Qty. on Purch. Order"; lDisponibilidad := lItem.Availability;// + lQtyOnPurchase; lStockSeg := lItem."Safety Stock Quantity"; IF lDisponibilidad < lStockSeg THEN BEGIN IF NOT lPedidoGenerado THEN BEGIN //crea la cabecera del pedido y añade la primera linea lPedidoGenerado := TRUE; lPurchaseHeader."Document Type" := lPurchaseHeader."Document Type"::Order; lPurchaseHeader.INSERT(TRUE); //lPurchaseHeader."Buy-from Vendor No." := lVendorCode; lPurchaseHeader.VALIDATE("Buy-from Vendor No.",lVendorCode); lPurchaseHeader."Order Date" := WORKDATE; lPurchaseHeader."Vendor Invoice No." := 'AITOR'; lPurchaseHeader.MODIFY; ...... When a new product is has a different vendor, I cerate a new purchase order. But I can see that INIT and RESET aren't doing anything. The INSERT is not returning any error, but in the VALIDATE of the "Buy-from vendor No.", I get this error: "There is already exist a pruchase header of type ordr and code 002507" 002507 is the first purchase order created when I run the function. Any hint? Thnak you very much

Forum Post: RE: Error creating purchase orders

$
0
0
Hi, I think RESET and INIT functions do their job here, but that's not what you need. RESET removes all filters from a record variable, but you don't apply any filters (at least, not in the snippet shown here). So it seems, you don't need reset at all. Now, INIT. It initializes the record, but does not affect primary key and timestamp fields, as described in help: https://docs.microsoft.com/en-us/dynamics-nav/init-function--record - What you need in this case is function CLEAR INSERT does not return any error, because it does not actually call the SQL insert query the moment you invoke this statement, considering you have buffered insert enabled. And from the symptoms described, it looks like it is enabled. https://docs.microsoft.com/en-us/dynamics-nav/bulk-inserts So, to sum up: it's not a bug, but completely expected outcome. Just call CLEAR instead of INIT.

Forum Post: RE: sum of value in another field

$
0
0
You'll have to do a bit of coding to implement something like this. In the simplest case, you just subscribe to the OnAfterModifyEvent of the table containing the field 'A' or write code in its OnModify trigger - depending on your NAV/BC version. In that trigger you add new value of the field A to the current value of the field B. If you follow NAV best practices, all the values you want summed up, should be stored somewhere in a table. Look at the table 9203 "Budget Matrix" for an example. Here, each data entry in a cell creates a budget entry record, and the matrix page displays the total amount of all entries.

Blog Post: ‘Codeunit’ does not contain a definition for… (AL0132)

$
0
0
Today I got this error message while publishing an extension to our Development system. Since our Development system just moved to Azure last week our Azure Specialist and I spent some time troubleshooting this. As always with these things the root cause was not in Azure SQL, but in my C/AL code in C/Side. Our database is hybrid and what I did is removing a codeunit. This was a cleanup since we moved one of our custom DLL’s into an Azure Function. The root cause of the AL0132 was a global variable pointing to a non existing codeunit. ‘Codeunit’ does not contain a definition for ‘xServer Management’

Blog Post: CRS AL Language Extension – ControlNames are no longer surrounded by double quotes

$
0
0
There is a recent change that I had to introduce in the CRS AL Language Extension – you know, that tiny little VSCode Extension that quite a lot of you seem to be using ;-). +89000 downloads/+21500 installs – that’s crazy! It’s one of my biggest projects I ever did for the community :-). Stop bragging, get to the point… Well – because of the fact that so many people are using the extension, I think I have to make you aware of an important change (fix) I did to the extension (already almost 3 weeks ago…). I have had a couple of requests to change the “rename” behaviour, which I had to implement, because they were causing small inconveniences. These were the requests: Rename command adds quotes around all object + control names Bugfix: fields in quotation if they contain special characters Long story short: because I simply put double quotes for fields on pages, I introduced some bugs. It didn’t work for procedure calls – and it might have ended up with crashing reports. A combination of commits (from both me and Kenneth (thanks Kenneth!)) will now make sure that the double quotes will only be there if needs to be. Much better of course, and it solves the bugs. But that’s just like any other bugfix … so now comes the real reason of this post … However, since you all will get this new version of this VSCode extension by default, you might have noticed that your names in your existing pages might automatically get more edits that you might have expected: when you rename the file (and for many people, that automatically happens when you save the file), it will “correct” all these fields. So you will have edits that removed quotes. You might have had this: And suddenly now you have this: That might be inconvenient – I have had the feedback from a few people. Well, it IS inconvenient – the issue is: you are making many more changes than you actually intend to. All these changes go into source control: so a changeset might give you non-important renames of controls .. which can be confusing. How do you handle it? Well, my recommendation would be. rename all commit with comment “Remove unnecessary double quotes for fieldnames” In that case, you have one isolated commit with all the rename-changes, and you won’t have any upcoming weird changes in any upcoming commit. Hope this helps! Enjoy the extension going forward!

Forum Post: how does Posting preview work on the back-end of NAV?

$
0
0
Hi does anyone here know how these G/L Entries Populate? because I need to add a entry from a different table to the G/L Entry Row. Thanks' in advance! Cheers!

Forum Post: RE: sum of value in another field

$
0
0
this is right but I found another way, I summed up the xrec and rec to get value.

Forum Post: Why many Companies leaving NAV/BC and going to Odoo?

$
0
0
Dears, I am just wondering if someone did a deep comparison between NAV/BC and Odoo Enterprise, I've seen a lot of companies just dropped AX or NAV/Business Central and implemented Odoo. I got many invitations to work in Odoo implementation, but not yet decided. I hope someone can share more about Odoo and how to negotiate with the Company to let them adopt NAV/BC and not to go for Odoo. Regards

Forum Post: RE: Error creating purchase orders

$
0
0
That's right, I've found the solution after posting this message. CLEAR was the solution, thank you!!

Forum Post: RE: how does Posting preview work on the back-end of NAV?

$
0
0
Posting preview runs the same posting routine that would do normal posting, but in the end of it, copies all entries created during the posting process, into temporary tables, and after that rolls back the transaction. This table where you want to add new records is a temporary instance of the table 265 "Document Entry". If you want to manipulate its content before showing it to the user, subscribe to the event OnAfterFillDocumentEntry of the codeunit 20 (Posting Preview Event Handler) - it will give the list from the screenshot, before showing it in the page.

Forum Post: Workflow check customize in nav 2018

$
0
0
Hi Team, My client is requesting for workflow check customize based on workflow user group, which contains the following fields: User ID, Full Name, Role (Sequence No.) and Dept Code (Dimension Value) whereby He filter by Dept Code to get the current workflow user group. Its possible yes or no. If yes I need your guide. Regards.

Forum Post: RE: HR Module leave generator not generating some of the staff leave

Forum Post: Report Makeing

$
0
0
Hi All I want create a Report Navision 2016 table data in field type code I want increment continue then start when bark increment then end or start next line Table Field Type Code Report Format Code Start End Total DD1000 DD1000 DD1006 7 DD1001 DD1015 DD1019 5 DD1002 DD1030 DD1035 6 DD1003 Total 18 DD1004 DD1005 DD1006 DD1015 DD1016 DD1017 DD1018 DD1019 DD1030 DD1031 DD1032 DD1033 DD1034 DD1035 Regards Vicky

Forum Post: RE: HR Module leave generator not generating some of the staff leave

$
0
0
It seems noone can help on this matter, and I can guess why. First of all, functionality you are referring to is definitely not international W1 version. And as far as I'm aware, none of the official Microsoft localizations have functions like "leave generator" or table "employee leave". Although I may be wrong here, but it seems, you are dealing with some partner solution (and not a very popular one), or customization done specifically for your company. And you don't even give a hint, such as NAV release, which country version you are using, if there are any extensions installed, etc.

Blog Post: Business Central 13 CU08 TearDown

$
0
0
Business Central 13 On premises CU08 is a small update Business Central 13 latest CU continues the series of in-between -updates on the product. It is clearly visible that MS is concentrating their muscles with the BC14 CU01 while making this one. Table 37 Sales Line contains a nice pattern that I would like to see utilized more. The new Local helper function is "ShowMessageOnce", and it is quite self explanatory. Codeunit 3006 DotNet_DateTimeOffset has gained a new helper function for date handling "ConvertToUtcDateTime". This function takes a DateTime in, and outputs a UTC DateTime. This function is then used from a lot of other objects. The helper function has been copied here from Codeunit 358 DateFilter-Calc. Perhaps MS is concentrating the .NET functions into a more reduced set of objects to help later updates, who can tell? Table 740 VAT Report Header has a new field; Amounts in Add. Rep. Currency:Boolean. This is used in report 742 VAT Report Request Page, and if you have done any modifications to VAT reporting, this is nice addition for filtering. Codeunit 10 Type Helper has a new eh, helper function; "GetHMSFromTime", which takes parameters (VAR Hour:Integer, VAR Minute:Integer, VAR Second:Integer, TimeSource:Time) and returns the difference between TimeSource and 000000T time. I cannot see directly where I could use this calculation, but it is good to know that there is such a function if I need it! Thats it, folks. Don't forget to join me in NAVTechDays 2019 in Antwerp!

Blog Post: Extensions | An item with the same key has already been added

$
0
0
If you work with Extensions in Dynamics NAV there is a fair chance that you’ve seen this message. Today I got it again, waisted half an hour of my live and decided to blog about it. What happened is that I have a Page Extension with the same variable name as already exists in my C/Side page. I’m working with NAV2018 CU17 and the compiler did not complain about this and the publishing process went fine. When you try to open the page the client crashes and this error is what you get in the Windows Event log. Hope this helps someone.
Viewing all 11285 articles
Browse latest View live