Linking field from one form to another..

yuppicide
Member Posts: 410
Using Navision 3.10.
I've went into a Table and added a field called "Standard Discount" which is text, with a maximum of 3 characters.
I've then went into my Form for Customer Card and added a label and textbox to make the above Standard Discount show up.
That part works fine and will save us time. This way we can easy see if the customer normally gets a discount from us without having to go in and read through all the Customer Comments.
Now, I'd also like this to show up on another Form which is for our Sales Orders. I don't want it to print on the Sales Order when I hit print. Just show up on the screen so we can see it when we're entering the order.
How would I go about linking the two? I do not have access to view C/AL Globals or Code on Forms unfortunately, only on Reports. I have tried giving a source expression as "Standard Discount" and giving it a Table Relation, but was unable to figure out how to get that to work.
I'd like to do this myself if possible because I highly doubt the company will spend money to get our Nav Partner to do this.
Thanks.
I've went into a Table and added a field called "Standard Discount" which is text, with a maximum of 3 characters.
I've then went into my Form for Customer Card and added a label and textbox to make the above Standard Discount show up.
That part works fine and will save us time. This way we can easy see if the customer normally gets a discount from us without having to go in and read through all the Customer Comments.
Now, I'd also like this to show up on another Form which is for our Sales Orders. I don't want it to print on the Sales Order when I hit print. Just show up on the screen so we can see it when we're entering the order.
How would I go about linking the two? I do not have access to view C/AL Globals or Code on Forms unfortunately, only on Reports. I have tried giving a source expression as "Standard Discount" and giving it a Table Relation, but was unable to figure out how to get that to work.
I'd like to do this myself if possible because I highly doubt the company will spend money to get our Nav Partner to do this.
Thanks.
0
Comments
-
The easiest way to do this would be to add the same field to the Sales Header table (not editable), and then some code to the Sell-to customer validation code to populate it when the customer is selected. You need access to the C/AL editor in the table designer though. You could add a lookup flowfield to the sales header table, but you'd need to have access to the validation code to do a CALCFIELD for it in the validation code either in the table or the form to be able to see it right when a customer is selected. Without the CALCFIELD it would still work, you would just have to save the order before it shows up in the form.0
-
I believe what you are saying is that when you are entering a sales order - you would like to see the value that has been assigned on THAT customer's card, not just linking this table to the sales order - correct.
It's so simple if you can get to the code but since you can't then this is not possible, unless you want to use a flowfield . The only other suggestions would to use another field or an unused field that exists on the sales order header as well as the customer card. perhaps dimensions if you're not using them for anything particular.
Or get a developer - to make the change for you on a one time pay basis.0 -
When you say "A table" did you mean you simply added a new field to the customer table? for some reason I was thinking you has some other table holding that field and you were showing it on the custmer card as a lookup.0
-
Okay two things..
On Table 18 Customer I've added a field for Standard Discount. Then I went into Form 21 Customer Card and made it show that field. Now on Report 50000 which is our Sales Order is where I wanted it to show up. When you enter a new Sales Order you first select a customer. When you do, all those fields get automatically populated. I'd like one to populate for this "Standard Discount" as well, taking the information from the Table.
I've located some documents from our partner. 99% of them are in reference to using basic functions in Navision, but one is about the Object Designer. There's 3 pages on FlowFields I am reading.
As reading this I seem to need a FlowField that does a Lookup from another table..
It statesThere are two properties that need to be changed in order to define this field as a FlowField.
The first property is the FieldClass property. Change this field to FlowField."
This I can do fine. Then it saysThe second property is the CalcFormula property. This property will define what field will populate this field and how it will be calculated.
I have no clue where to find CalcFormula property. They quickly mention something about updating a FlowField, you must use the C/AL function <Record>.CALCFIELDS.
In the example they showed how to create a new table of Ledger Entries and make that flow into an already existing Test Customer Table into the Amount field.0 -
for the report - on the Sales Header section onaftergetrecord if you do a
Customer.GET("Sell-To Customer No.");
you will then be able to add a text box in a section with sourceexp "Standard Discount" and it will appear.
To make is show on your Sales Order Form (Header)
Add a new field to the sales Header "Standard Discount" same TYPE & SIZE you used to create in in the customer table.
Then view the properties of that field
The FieldClass = FLOWFIELD
The CalcFormula = Lookup(Customer."Standard Discount" WHERE (No.=FIELD(Sell-to Customer No.)))
Now add the "Standard Discount" Field to the Sales header card & when you enter the Sell-=to customer name - it will show the value of that field for that particular customer no.0 -
Messed that last post up. I'm trying to add the Standard Discount thing to a FORM.
I think I might contact my partner and re-ask about this. Based on the documentation I found, maybe I should be allowed to do what I need.0 -
What part is confusing you. I tested this and it works fine.
I understand you want to add a field to the sales header FORM but you need to create a new field in the 50000+ range to accept the value you will be getting from the customer table.
Customer Table - Create a new "Standard Discount" field
Customer Form -> Add the field to the form.
Sales Header Table - Create a new "Standard Discount" field
Sales Header Form-> Add the field to the form.
Changing the properties of the Sales Header Field to a flowfield lookup will only take the value stored in the customer table and display it on the sales header.
I will gladly print screen step by step instructions if you need them & post it.0 -
Here ya go.
http://savatage99.googlepages.com/Flowf ... xample.pdf
No special License needed. Note this is for visual purposes. You're not using it for any calculations correct?0 -
Wow! Thank you so much. No, I am not using it for calculations. It'll only be to display the message.
I am going to wait until 5pm when everyone is leaving for the day or tomorrow morning to give this a try.
I followed along just fine and got an error message when I tried to go in Sales Orders. I had to remove it from Sales Header temporarily.Savatage wrote:Here ya go.
http://savatage99.googlepages.com/Flowf ... xample.pdf
No special License needed. Note this is for visual purposes. You're not using it for any calculations correct?0 -
good luck - don't forget to post the error message if you get one.
Basic steps, add same field to two tables, add same field to two Forms, change the properties of sales order field to lookup flowfield.0 -
Extra Bonus - I read about your 1.8ghz pc on the other forum.
If your company thinks cheap (& we do too) try
http://www.intechraoutlet.com/home/sear ... bin_id=web
Dell OPTIPLEX GX280
Pentium 4 - 3.6GHz
80GB HD SATA
CD-RW DVD Combo
1GB RAM
Fast Ethernet (100Base-X) Network Adapter
Sound Card Included
Video RAM:32 MB VRAM (Card)
Price: $162.25
You supply the software. 8)0 -
Thanks for the link! I only wish you could see the "condition class" on that main page, but it's okay most of them are C which is decent condition.0
-
Going to wait until the office is on lunch today.
Below you say add to two tables and two forms. Don't you mean one form? Just Sales Order form where I want it? Instructions I have are for one form.Savatage wrote:good luck - don't forget to post the error message if you get one.
Basic steps, add same field to two tables, add same field to two Forms, change the properties of sales order field to lookup flowfield.0 -
The condition of the PC's are pretty good! we have a bunch here - no problems - also comes with keyboard & mouse.
If you don't add it also to the customer card then how will you enter data? (PS It's probably already there - you added it)0 -
I got it to work. I must have entered something wrong when I did the lookup flowfield yesterday is why I got the error.
I made the one on my Sales Order non-editable. The only thing I can't figure out is how to make it not have an arrow next to it. You know where you click the arrow and it opens up. Those two Special Instructions boxes above it have no arrow when you click in them.
Screen shot:
0 -
It's a lookup that's why you have the arrow.0
-
Earlier you guys helped me make a Discount Comment on the customer card that only shows up on sales header, but does not print. Have a similar situation to the above, but want it to print.
I can't find if we discussed this or not or if my license won't allow me.
Let's say I've made a new textbox called "Invoice Instructions" on the customer card. I've already set it up.
I want that field to print on my Picking Sheet.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