Problems with the reserves

Raziel
Member Posts: 5
I have a problem with the import of a dataport, it was designed to import a txt file into a sales order, we use validates to import the txt but it does not work as we wish, because I would like to reserve automatically and it is has been impossible to do.
The validate trigger of Product code makes the reserve when you do it manually, but not with the dataport, could anyone help me?
thanks in advance.
The validate trigger of Product code makes the reserve when you do it manually, but not with the dataport, could anyone help me?
thanks in advance.
0
Comments
-
Hi,
Is product code a standard navision field in financials?
Anyway, have you tried inserting the sales line before you validate the field?
If the primairy key is complete you can insert the record, then if the record is complete you can do a Modify.0 -
I always run into things like that, where you set the validation property to 'yes' and it still doesn't validate the fields you want. In those cases you can simply program it in your dataport. Assuming that you have the Item number field mapped to your dataport and your dataitem is called "Sales Line", go into the dataitem you need and press F9 to open the C/AL editor. In the OnAfterImportRecord trigger, type this:
"Sales Line".VALIDATE("No.");
Of course, this will also do stuff to other fields, so you need to make sure you get the correct results.0 -
I have made what you suggested, but when I import the file, the reserved quantity is always blank.
I have designed a Report that only validate the quantity of this sales order and the reserved field is still blank, I think I will Shoot the monitor the next time I see this blank field.
Thank you.
](*,)0 -
If you want to duplicate a standard Navision process, you need to first figure out what is going on behind the scenes. Turn on the debugger and perform the task that you want to automate. Then, in your code, you duplicate that process and customize it for your needs.
Apparently, validating the quantity does not do the trick, so you need to figure out what does. I believe there is a function that you can send in a Sales Line that does this, but I'm not sure which one it is. I would turn on the debugger and find out.0 -
thank you denster, but there is a little problem with the debbuger, I was working as Navision and Sap consultant, and now I am Working in a final customer with Navision, we have no license to do a lot of things.
So when I debug it is only in process and it takes a lot of time to find the code to reserv, and then I can´t open de code.0 -
I guess you better buy that license then huh :whistle:
If you have the dataport designer, you should have access to running the debugger. Are you a SUPER user? Usually I can run the debugger on my customer licenses. Even if you can't open the object designer, you can figure out what the program does and duplicate it in your dataport.0 -
also insert(true) and modify(true). ARe you doing this in your dataport?0
-
Denster, maybe I don´t explain it well, I can run the debugger, but only when I run the process, and I have to read a lot of code before the reserve function.
And Yes, I use the insert and modify function before the end of the Dataport, in the OnAfterImputRecord0 -
Your problem is that even if you run a validate, it only runs the validate of the table.
The reservation is made from a trigger in the sales order form.
This will not be run the way you do it, so copy the code from the onaftervalidate of the field quantity in the form.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