We would like to simplify our data entry of invoices. All of our invoice detail lines will have the same dimension values for the entire invoice, so we would like to enter the dimension values just once on the header form and have the detail lines automatically default to the values entered on the header form. This is essentially the way that the two global dimension fields behave except these two global dimension fields are actually stored in both header and line tables. We don't want to change the way Navision handles dimensions so we are not adding the dimension (shortcut dimensions) to the header table.
Is there a way to pass the values of the two shortcut dimension values which are stored in variables only on the header form to the subform?
Revision:
What I really should ask is when you are in the subform, is there a way to get a value that has been entered to a variable on the header form?
0
Comments
Also when you create new lines it picks up the dimension from header.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
PS. By "shortcut dimension" I mean shortcut dimensions 3 to 8....
for instance I have a responsibility center code 07
is has
Department code 07
Location code 07
Project code PTO
Rack code - A1 (shortcut 3)
TACCt code - CASH - (shortcut 4)
I enter responsibility center 07 on the header, all the codes get entered in the header and the line dimension tables. this sounds like just what you are asking, with no modification needed. If you don't have the responsibility center granual, it would be cheaper to buy it and use then to modify the code and then maintain it during an upgrade later on.
Just my opinion
Also shorcut dimension replicate as well from header to lines, not just global dimensions. Just open a chronus db and create an order and select non globa dimension on order.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
This seemed like such a simple request but I just cannot find the mechanism to make it work. All we want to do is get values stored in variables on the header form from the subform.
Can you please elaborate the replicate of shortcut dimension from header to lines? I thought this was just possible with global dimensions (ie. shortcut dimensions 1 and 2). If this is possible, it sounds like what we need on the dimension side!
Although, I still need the information on how to get values from variables entered on the header form because there are other fields that the client would like to enter just once on the header form and have that propagated to the detail lines.
but you could set up a variaty of responsibility centers that are similar.
ie
07-1 could have one set of dimension
07-2 could have another combo of dimension
then for your reporting needs you could filter on responsibility center 07*
But more likely you are going to be reporting on the dimensions anyways,
if this doesn't work, then you should use "ara3n" recomendation and do a little coding, otherwise it is going to be hard to add info from the header if you don't want to modify the header, the two needs to not go together, without being creative.
For other fields that you want to replicate to the lines. You need to make modification for this. In sales Header there is a function called updatesalesline. Modify this function to add the new fields
Could you be specific what fields you want to replicate to the line?
Most of the fields that are needed are replicated.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Re: "All the dimensions are copied from header to line."
I can see that Shortcut Dim 1 code and Shortcut Dim 2 code are copied from header to line. Shortcut Dim 3 to 8 are not entered on the header form. They are entered on the line subform. Our client has four dimension in total. Two of which are Shortcut Dim 1 and 2 so when we enter these on the header form, they are copied to the detail line. The remaining two are Shortcut Dim 3 and 4 and they are only entered on the line subform so they have to be entered on every single detail line. Since an invoice has the same dimension codes for every detail line, the client would like to simplify data entry by only entering shortcut dim 3 and 4 once on the header just like shortcut dim 1 and 2. Problem is shortcut dim 3 to 8 are not stored on the header table (or the line table for that matter). Only shortcut dim 1 and 2 are stored on the header and line tables.
Re: "Could you be specific what fields you want to replicate to the line?"
An example is the tax group code or any other field where the value is the same for all detail lines for a particular invoice header. We want to put a field in the header to capture what the value should be and have the detail line pick up the value from the header.
We are looking for the least intrusive way of accomplishing this. I could add these fields to the header table and have the detail line read the header record but that seems a little excessive.
If you use the "Line" button on the bottom next to the "Order" button, it will show you the same dimensions being entered for each line.
These values are stored in a separate table before posting - Document dimension table 357.
They did this so you could access all the extra dimensions you wanted without having to hard code the tables with the extra field, if you follow the approach you are on, you will need to modify the sales header table and the sales line table to add the short cut dimension 3 and 4 to each, then modify the code to record this info. and if in the future you decide you want to also track additional dimensions you will have to again modify the tables and the code. Instead use the built in functionality and modify your report to use the value entry table to get the dimensions. all these values for are stored in the posted document dimension table 359, you can make your report with the posted sales line table and the table 359.
Unfortunately, the client isn't using Orders. We are trying to do this in both the sales and purchase invoice forms.
I think I may be leading everyone down a more complicated path than there needs to be. If so, I apologize. :oops: I have been experimenting with CurrForm.Update(TRUE). It seems like it should do what I need. Initialize the fields in the detail line form with values entered on the header form. I'm just haven't gotten the exact results the client wants. Am I using CurrForm.Update correctly? Confused yet??? :?
These values are stored in a separate table before posting - Document dimension table 357.
They did this so you could access all the extra dimensions you wanted without having to hard code the tables with the extra field, if you follow the approach you are on, you will need to modify the sales header table and the sales line table the posted sales header and posted sales line tables, (and the purchase header, ect ) to add the short cut dimension 3 and 4 to each, then modify the code to record this info. and if in the future you decide you want to also track additional dimensions you will have to again modify the tables and the code. Instead use the built in functionality and modify your report to use the value entry table to get the dimensions. all these values for are stored in the posted document dimension table 359, you can make your report with the posted sales line table and the table 359.
What about the concept of defaulting a field in the detail line subforms with values entered on the header form? Is CurrForm.Update(TRUE) the way to achieve this?
So I will ask what fields do you want to default. If you tell us what fields. We can help you find the right solution.
For example Clients wants to default qty to 1 for example. Or want to only see type of item.
Please tell us what fields you want to default to.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
The field that I would like to default from the header form is Tax group code (purchase invoice). There may be a few more coming, I am just waiting to hear from our project manager.[/quote]
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
We are really keen on fast (really, really fast) data entry. So yes the tax group code does default from the item and gl but we want to be able to change the tax group code on the invoice (if the one defaulted in is not correct) in one spot on the invoice screen and have it (tax group code) propagate to the detail lines of that invoice when we enter the details.
This customization really is for the purpose of fast data entry. We want to key information that is the same for the entire invoice in one spot and have it propagate to the detail lines as the lines are entered without having to key them at each line.
We do sometimes have to change the "tax area code", but that defaults from the customer card, or the ship to address. The only occation we have to change that is when a resale customer is purchasing something for there own internal use and we need to charge sales tax. In that case we change the tax area code on the "invoicing tab" which does change it everywhere on the order.
On header there is field called tax liable uncheck that field. Do not change the tax group code. The tax liable field will make the whole order nontaxable.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
You need to setup tax jurisdictions for this,
for instance you could have a jusisdiction that is native status and the rate would be zero,
The sales tax setup is complicated, but it does make since. Here in california I have fifty different local tax rates, as well as governments customer at zero, resales customer at zero rate. Once you set the customer tax code that triggers the rate charged on the order.
Thank you.
As long as you have tax area code filed but the tax liable not checked navision creates the tax entry (actual table name Vat entry ) tables which the report uses for printing the tax information and prints info on sales that were tax exempt.. I'm pretty sure. What version are you using themave?
Otherwise if you have to create an nontax tax area code for every tax area code and dublicate the tax detail lines which would be nontax joursdictions and have the tax detail combination for every tax group code. If you are shipping to 5 states That will be unmaintainable. Tax is allready as unmaintainable as it is.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
so, is there a way to access a variable that exists only in the header form (ie not on the header table) from a subform? Without using single instance code unit.
HeaderTaxGroup := NewTaxGroupcode;
Now Onaftervalidate of the item,
if HeaderTaxGroup <> '' then
validate("Tax Group code", HeaderTaxGroup);
On Sales Order Form on the new text box, onaftervalidate You are going to put the following code
CurrForm.Saleslines.SetTaxGroup(HeaderTaxGroup);
Now you have to remember that if you close the form the text box will be blank.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n