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?
0
Comments
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.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
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.
http://www.BiloBeauty.com
http://www.autismspeaks.org
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..
Now are you looking to add a dialog message afterward? 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()
http://www.BiloBeauty.com
http://www.autismspeaks.org