Password Option

NAVEDI
Member Posts: 3
Hi,
I have created a function in the EDI Receive where if the EDI price does not match the Navision Unit Price for an item it will not create a sales order. I want to add the ability to use a password to "force" the sales order to create.
Any ideas?
I have created a function in the EDI Receive where if the EDI price does not match the Navision Unit Price for an item it will not create a sales order. I want to add the ability to use a password to "force" the sales order to create.
Any ideas?
0
Comments
-
I suggest a different approach.
Instead add a field to User Setup to allow override.
Then change the code to check this field and if's checked and GUIALLOWED then confirm that the price is different and if the user wants to continue.
If UserSetup doesn't exist or is not checked error out.0 -
The Lanham edi adds some fields to the sales line like "EDI Unit Price" & "EDI Price Discrepancy (Boolean)"
Then it's easy to filter on that field "YES" to see which items are an issue. Then it's up to you to let them go or delete them.
Even easier if you add a menuitem to do the filtering for you. That's what we did.
Caption:"Find EDI Price Discepancy"
PushAction:RunObject
Runobject:Form Sales Lines
RunFormView:SORTING(Document Type,Shelf/Bin No.,No.) ORDER(Ascending) WHERE(Document Type=FILTER(Order),EDI Price Discrepancy=FILTER(Yes))
So if you make it stop with a pop-up message and you have a lot of orders - it's alot of clicking.
This way the orders pass & then all the questionable lines can be viewed at once.0 -
thanks for the tips, unfortunately we have to stop the orders from coming in. the person who is suppose to check these are still letting the orders go to shipping despite the Boolean being checked. But I need to add a force to create the sales order if there is approval for the order to go at the "incorrect" price.0
-
Are you saying you are using Lanham edi? But need a mod to it?
If you are using lanham then you need to look at CU 14000361 - EDI Create Sales Order
There is a section as shown below that will determine that their is a price discrepancy..SalesLine.VALIDATE(SalesLine.Quantity,LastQty); IF LastUnitPrice <> 0 THEN SalesLine.VALIDATE("Unit Price",LastUnitPrice); IF LastEDIUnitPrice <> 0 THEN BEGIN SalesLine.VALIDATE(SalesLine."EDI Unit Price",LastEDIUnitPrice); IF SalesLine."Unit Price" <> SalesLine."EDI Unit Price" THEN SalesLine."EDI Price Discrepancy" := TRUE; END;
Now are you looking to add a dialog message afterward?If SalesLine."EDI Price Discrepancy" then begin if CONFIRM('This order has a Price Discrepancy Item:%1 Price:%2 EdiPrice:%3 Continue?',Salesline."No.",SalesLine."Unit Price",SalesLine."EDI Unit Price", FALSE,TRUE) then error('Order Stopped'); end; //not tested just a rough thought.
Personally I like creating the order and viewing the differences after. That requires just training, no code, no mod.
Another way if you create the order is to place code on CU 414 Release Sales Document.
On release it can rifle thru the lines and error on if it hits SalesLine."EDI Price Discrepancy" := TRUE
OnRun()SalesLine.SETRANGE("Document Type","Document Type"); SalesLine.SETRANGE("Document No.","No."); SalesLine.SETFILTER("EDI Price Discrepancy",TRUE); IF SalesLine.FIND('-') THEN ERROR('Price Discrepancy Exists On %1 %2',"Document Type","No.");
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions