Field
fahd
Member Posts: 226
Dear Experts,
In item card there is a field called Vender no. I've created one form which is desinged on the base of Table no. 37 Sales line.
But in that form i want that Vendor no. field. I have tried to created new variable named item within that form. i gave the datatype
as RECORD and i gave source expression as ITEM.VENDOR NO.
but it is not coming in that form.
Please tell me that how can i bring the field Vendor no. in my newly created form which is designed on (Table 37 Sales Line).
i know vendor no. field is not part of Table 37 but i need that field in my newly created form.
Waiting for earliest reply.
Thanks & Regards,
Fahd
In item card there is a field called Vender no. I've created one form which is desinged on the base of Table no. 37 Sales line.
But in that form i want that Vendor no. field. I have tried to created new variable named item within that form. i gave the datatype
as RECORD and i gave source expression as ITEM.VENDOR NO.
but it is not coming in that form.
Please tell me that how can i bring the field Vendor no. in my newly created form which is designed on (Table 37 Sales Line).
i know vendor no. field is not part of Table 37 but i need that field in my newly created form.
Waiting for earliest reply.
Thanks & Regards,
Fahd
0
Comments
-
So you want to add "Vendor No." to the sales line table.
First add the field "Vendor No." to the table - Code(20) (50000+ range)
If you look at the code behind the sales line table you will see
OnValidate of "No." that many fields are filled.
What you're looking for is the part where it says...
Type::Item:
.....
.....
.....
you will see other item fields tax groups, posting groups, etc being transfered.
You would add
"Vendor No." := Item."Vendor No.";
The "GET" is already been fired so you don't need that here.
**now if you want this "Vendor No." field value to transfer over to the posted Invoice & Shippments,
You'll have to add the same Field to those other tables - using the Same Name & Number & Size.0 -
Dear Savatage,
First of all thanks for such a detailed reply.
I have tried adding up a field in Sales Line table. But it says "your license does not allow you to create a field". Even i have used the developer license.
My license only allows me to add the field up in Table 27 Item.
I was wondering if without creating field in Sales line table. Suppose if i want to create a form based on Sales line table. Can i bring the vendor no. field in the form??? if yes then please bear with me and let me know.
Thanks & Regards,
Fahd0 -
You can do it on the form with a variable as you tried it. Basicly you need to put the Item.GET("No.") in the OnAfterGetRecord trigger of the form + checking if the Type is Item.Thomas Martin
NAV Developer0 -
Dear Thumartin,
Thanks
!!!
But, I created on variable named ITEM, i selected that data type as a RECORD & subtype as ITEM.
Then i came to the ONGETAFTERRECORD TRIGGER.
I mentioned like this.
item.GET ("Vendor no.");
but its is saying unknown variable "VENDOR NO.".
Please tell me more i think i m making mistake somewhere?
Regards,
Fahd0 -
it's more like
if type = type::item then //<- sales line has to be type item or you'll get for example item.get(g/l account number)
item.get("No."); <- get is the function where you GET a record with parameters primary key (vendor no. is not a primary key)
item."vendor no." => your wanted data
But I really suggest to take a look at documentation, msdn, and other training materials.0 -
:-kfahd wrote:I have tried adding up a field in Sales Line table. But it says "your license does not allow you to create a field". Even i have used the developer license.
My license only allows me to add the field up in Table 27 Item.
what filed id number are you using?0 -
Dear Savatage,
It's generating itself the new field number after the last one. I know there is some specific series of numbers that i can start with. But i don't know from where that series starts. so i just started the next generated number.0 -
The ranges of fieldnumbers you can use in standard tables are 50000-99999.
This information can be retrieved from standard learning materials.
And although NAV generates a fieldnumber, they are suggestions, they will always be the number of the previous field (one row above) +1 unless that number is already assigned. Then it will choose the next available number in that range.
I (and I think I can say We) recommend learning materials and training to gain knowledge of C/Side.
Also, could you please confirm you are not working on any real NAV projects? At least not until you've gained (much) more experience.0 -
Dear Mr. Savatage,
Thanxxxxxx alottt. It's done. now it i showing me the field now, I really appreciate your help sir. thanx every one as well.0 -
FYI: the reason I mentioned the code should be added in the section after
Type::Item:
is that if it's just anywhere you run into the problem of Item.Get("No.") failing.
like if you use a g/l account no for example.
So by executing the code when you know the "NO" has to be an item number solves that.
Else you should use a If Item.Get("No.") then...else.....
to avoid a crash.
Just some extra info you can keep in mind as I saw you were having problems understanding the "GET".
It's the little things.
0 -
Dear Mr. Savatage,
Really appreciate your help thanks alot for that
. 0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions