First have 2 variables Startdate and Enddate both datatype Dates. Startdate := calcdate('+CM',today); enddate := calcdate('1M',today); purchaseline.reset; purhaseline.setcurrentkey("posting date"); purchaseline.setrange("posting date",startdate,enddate); purchaseline.calcsums(quantity); Make sure you have a key and sumindex set for quantity.
↧
Forum Post: RE: Current Month "Purch.Order quantity" to next Month
↧
Forum Post: RE: Print report from page 31 - NAV 2015
Hej Kim, Velkommen til DUG. Better continue in English. Thank you for your post, but is your post a question? The overall "design" sounds fine, it should not be too difficult to do. Eventually you could look at the way "report selections" works. I think you could use a similar "setup". Or as you say have a table with the different available label reports.
↧
↧
Forum Post: RE: Check Order Date vs Posting Date on Warehouse Shipment
Hi Dinhson, First time I've seen this one. You can't have two repeat loops in one like this. If you want to loop them, then you can do it inside with REPEAT a.findset REPEAT b.findset do-something; until b.next=0; until a.next=0 ; but that always ends up giving less readable code. And that's not the only problem. So rather than trying to tell you what was wrong, then I would do it like this: LOCAL PROCEDURE CheckSalesOrdersWarehousePostingDate() // Local vars: SalesHeader WITH SalesHeader DO BEGIN SETRANGE("Document Type","Document Type"::Order); IF SalesHeader.ISEMPTY THEN EXIT; REPEAT CheckWarehousePostingDate(SalesHeader); UNTIL WarehouseLine.NEXT = 0; END; LOCAL PROCEDURE CheckWarehousePostingDate(SalesHeader : Record "Sales Header") // Local vars: WarehouseLine WITH WarehouseShipmentLine DO BEGIN SETRANGE("Source Type", SalesHeader."Document Type"); SETRANGE("Source No.",SalesHeader."No."); IF ISEMPTY THEN EXIT; REPEAT IF "Shipment Date" <> SalesHeader."Order Date" THEN ERROR('Order Date <> Shipment Date') UNTIL NEXT = 0; END; Two separate functions, with each their task. WITH a DO BEGIN gives you a much cleaner code. Put the functions in a codeunit, not directly in a page or table. I have seen "issues" when used there, due to the global Rec var that may conflict with your with statement. Also no need for RESET's inside a function, as long as the record is only defined as a local var. Same thing can happen if you have both a global var and a local var with the same name.
↧
Forum Post: RE: Replacing BizTalk with NAV web services - thoughts?
Hi Rob, Phase out BizTalk is the right decision. It had it's time. The question is with what? XMLPorts, Web Services and the Job Queue? I love web services. When used correctly then they are great. And correctly in my mind depends on what you want to transmit. Data lookup, simple entry pages etc. As to large data volumens, then I would be in doubt. If you are replacing BizTalk, which is known to be a system capable of handling large number of transactions, because of "performance issues", as I can read it, then I doubt that BizTalk's performance was the real issue. If setup and configured correctly, then it runs great. But it does take a lot of maintenance is my experience. Or did. I didn't work with BizTalk for over 10 years now. The real issue may instead have been the NAV to BizTalk part, and how this integration was done. If that was designed to handle a few orders daily and suddenly a lot, then the NAV installation may be the problem. In that case going to Web Services will not solve much, NAV will do the same blockings (unless of course the idea is only to run it nightly). The question is also who sends the orders to you? The customers would need to change their system to be able to send orders using a web service. If just a few customers, then maybe not a huge issue. But that was exactly what BizTalk was good at. "Document Exchange" receiving one format to turn it into a different standardized format, which could then be imported/exported from NAV. All this "infrastructure" work that BizTalk used to handle, would need to be handled inside NAV if you use web services in NAV. Doing this from a clean start will not become a small project. Or is the solution you consider that you, from NAV, would use web services to import orders from your customers? Did you consider checking out the market for ISV products which could do this for you?
↧
Forum Post: RE: Check Order Date vs Posting Date on Warehouse Shipment
Thanks you Erik. It's work
↧
↧
Forum Post: RE: XMLport - filter sales line using sales header field.
Do you only have Sales Invoice Line as a dataitem in the xmlport? If yes, then you have alot of lines then of course it will take a looot of time, as you will have to read all lines first. If you add sales invoice header to the dataset, then you will be able to filter on the salesperson code directly in the header. And the you would link the headers and lines. That would change it so that only the correct sales lines are read from the database.
↧
Forum Post: RE: XMLport - filter sales line using sales header field.
And for the blank line, that's the settings of your xml port. Hard to say without seeing what you did.
↧
Forum Post: RE: Current Month "Purch.Order quantity" to next Month
Hi Vijaykumar, SBHaTBNg's suggestion might work, it depends on what you need. His code will show you the order quantity for unposted purchase lines (which is a both requisitions, orders, unposted invoices and credit memo) with a posting date this month. But I think that's not really what you are looking for? But the few time I had a customer asking me for a "Monthly Purchase Order Report", then they needed to see the purchase order quantities for that both, both posted and unposted. In your case, as for what I can read out of your question, then what you need is a report, which shows the purchase order quantities for open orders with an order date in this month, but with an expected receipt date next month? If that is the case, then it get's a bit more complex, as you cannot use the calcsums function. You could do something like this: PROCEDURE GetPurchaseOrderQuantityNextPeriod(CurrentMonthStart,CurrentMonthEnd,NextMonthStart,NextMonthEnd) : Decimal; // Local Vars: OrderQty : Decimal; BEGIN OrderQty = 0; WITH PurchaesLine DO BEGIN SETRANGE("Document Type","Document Type"::Order); SETRANGE("Order Date",CurrentMonthStart,CurrentMonthEnd); IF ISEMPTY THEN EXIT(0); FINDSET; REPEAT IF ("Expected Receipt Date" >= NextMonthStart) AND ("Expected Receipt Date" <= NextMonthEnd) THEN OrderQty += "Outstanding Quantity"; UNTIL NEXT = 0; END; EXIT(OrderQty); END; I expect that you know how to calculate the dates before calling the function. And it's quite easy to change to filter on specific items etc. Save
↧
Forum Post: RE: XMLport - filter sales line using sales header field.
Hi Erik, Thanks for the reply, I tried the ame thing which you said. but the xmlport is not like reports. We are not able to keep parent child dataitem relationship in xmlport. if we indent two table element node we face below error message --------------------------- Microsoft Dynamics NAV Development Environment --------------------------- An element with source type Table cannot have Table element children. --------------------------- OK --------------------------- If we dont indent but just link the two element using properties, only first sales header's line data only exported to csv. Also the blank row comes in csv even we set the min occurs property to zero. Could you please check and help me on this. Thanks, Shyam
↧
↧
Forum Post: RE: XMLport - filter sales line using sales header field.
↧
Forum Post: RE: XMLport - filter sales line using sales header field.
Hi I found the answer for this. We can use Integer table as a data source and create a temp sales line variable and insert the filtered records in temp sales line variable. Then use the temp table to loop as many number times. Sample code for better understanding. PWTrxLine - Export::OnPreXMLItem() CLEAR(gtTrxLines); gtTrxLines.DELETEALL; lPWTrxHeader.RESET; lPWTrxHeader.SETRANGE("Document type",lPWTrxHeader."Document type"::Shipment); lPWTrxHeader.SETFILTER("Client Program",'321'); IF lPWTrxHeader.FINDSET THEN REPEAT lPstdTrxLine.RESET; lPstdTrxLine.SETRANGE("Document type",lPWTrxHeader."Document type"); lPstdTrxLine.SETRANGE(Document,lPWTrxHeader.Document); IF lPstdTrxLine.FINDFIRST THEN REPEAT CLEAR(gtTrxLines); gtTrxLines.TRANSFERFIELDS(lPstdTrxLine); gtTrxLines.INSERT; UNTIL lPstdTrxLine.NEXT = 0; UNTIL lPWTrxHeader.NEXT =0; CLEAR(gtTrxLines); PWTrxLine.SETRANGE(Number,1,gtTrxLines.COUNT); PWTrxLine - Export::OnAfterGetRecord() IF PWTrxLine.Number = 1 THEN gtTrxLines.FINDFIRST ELSE gtTrxLines.NEXT;
↧
Blog Post: Microsoft Q1 2018 Earnings Release: Revenue exceeds market expectations, handily
Microsoft has released the following results for the quarter ended September 30, 2017: Revenue was $24.5 billion and increased 12% Operating income was $7.7 billion and increased 15% Net income was $6.6 billion and increased 16% Diluted earnings per share was $0.84 and increased 17% For the fourth consecutive quarter, CEO Satya Nadella credits commercial cloud. "This quarter we exceeded $20 billion in commercial cloud ARR, outpacing the goal we set ...read more
↧
Blog Post: From the Microsoft Dynamics NAV Blogs: Item transfer; Custom cue; Certificates of supply; Approval workflow
From this week's Microsoft Dynamics NAV blogs: Item Transfer in Dynamics NAV Procedure to Create a Custom Cue Based on a Query and a Normal Field in Dynamics NAV Certificates of Supply in NAV Approval Workflow Setup and Process in Microsoft Dynamics NAV 2017 Item Transfer in Dynamics NAV On his Dynamics NAV Essentials blog, Mahmoud M. AlSaadi wrote that transferring items from one site to another when you're working with inventory is a common business ...read more
↧
↧
Forum Post: RE: Query READ speed performance reduced when upgrading from 2015 to 2017.
Hi Edward, It's a couple of months ago, but did you ever find out what was causing it?
↧
Forum Post: RE: Check Amount on Item Charge Assignment vs Amount Purchase Line
Hi Dinhson, You should try with some BEGIN's and END's... [:)]
↧
Forum Post: RE: How to bring the reason code from Item journal page to G/L entry?
Hi Gary, The reason code is already posted on the value entry. So you need to bring it the last way. You would have to add reason code to the Invt. Posting Buffer table. And then you need to update codeunit 5802 to transfer the field to the Gen. Journal Line, where it then will get to the G/L Entry. This may sound quite easy, but it is not. When yo want to add another field to this flow, then you have to change the logic which today make sure you have as few g/l entries as required. A new field is like a new dimension. The best way to figure out what it's doing would be to set a breakpoint on the BufferInvtPosting function and run the debugger from there. That will show you how it works. [:)]
↧
Blog Post: Microsoft Dynamics Webcasts, October 30-November 3, 2017: CSP alliance; B2B social media marketing
Here's what's happening on this week's live webcast schedule. Register to attend live or get access to the recorded event. Wednesday, November 1, 2017 Microsoft's CSP Program: The Why, What, and How for Dynamics Partners 12:00 PM EDT Register Microsoft has ma... read more ...read more
↧
↧
Forum Post: RE: How to bring the reason code from Item journal page to G/L entry?
Hi Erik. I will try. Thanks for your anwser. Have a great day.
↧
Forum Post: RE: Check Amount on Item Charge Assignment vs Amount Purchase Line
Thanks you Erik. I tried, tried to begin.. End but still no effect. It's not work.
↧
Forum Post: RE: Check Amount on Item Charge Assignment vs Amount Purchase Line
And maybe a repeat until... You are only finding one.
↧