hello,
I'm trying to put a message any time the lenght description of a sales line become greater than 60 characters (the description accept 100 in the database). But I don't find where navision "stocks" the variable before changing the record.
can anyone help?
0
Comments
as for Navision "Stocking" the variable the only way I could do any kind of STRLEN check was on validate. This wont help you though on the checking whilst your typing :!:
What is the reason behind the 60 characters ??? Is it that you only want to allow entry of 60 characters and then append something to the description that takes a further 40 ??? If so , you could always use a variable with max length of 60 characters and then commit this with your addition to the description field
let us know soon .
Make a variable that only allows 60 characters and transfer that to the Description field using the "OnAfterValidate" trigger of the field on the form.
This way no modification is needed to the description field on the table OR form and your report will look ok
or if you want to look really clever, create a new section of the report with an alternative layout. in the "onePreSection" of that section on the report do something like this:
so this means you will have two sections to show line information but you can have two layouts that will format the report layout as you would like to show it
- create a new dataitem (using table 2000000026 as dataitemtable) ... this dataitem should be a "child" of the dataitem with the discription
- create a new global named smalldescription or something else (type: text, length: 100)
- add a new section (type: body) for the new dataitem in your report
- code the following in onpredataitem: - code the following in onaftergetrecord: - now add a field to the new section with the sourceexpr 'smalldescription'
i think this will work ... :roll: