Navision 3.10
Short version: "Shipping Agent Service Code" is entered on Customer Cards, but does not show up on Sales Orders. We have to enter it each time.
When entering new customers in Navision on the Customer Card we have a few fields we fill in reference to shipping.
On the main Customer Card under the General tab we fill in "Shipping Agent Code" for example "UPS" and "Shipping Agent Service Code" which for example is "GROUND". We also fill this in on the Ship To Address screen in addition there's a third one that says "Shipment Method Code" which in this example is "Package".
When I enter a Sales Order it is supposed to populate the three fields on the Shipping tab, but "Shipping Agent Service Code" is blank. Any ideas where to look and try to find this error? I can use a drop down box to select Ground each time, but I shouldn't have to.
0
Comments
I've looked in the Sales Header. It seems to have information I need.
I see all the Fields in there.. Shipping Agent Code, Shipment Method Code, and Shipping Agent Service.
Shipping Agent Service Code is what does not populate. I think in it's properties lies my answer.
For TableRelation it says"
That should be changed to "Shipping Agent Service Code" I think.
You'll need to examine the code behind the OnValidate trigger for Sell-to Customer (or Ship-to Customer, whatever field you are entering when you want it to fill in).
If you are scared of making changes you should really think about setting up a development environment. Making changes directly to a production system is a big no-no. That way you can mess things up and you won't hurt anything.
http://www.BiloBeauty.com
http://www.autismspeaks.org
We were going to setup a development environment. Originally our Navision partner was going to set one up for us. Now, you and I both know it's nothing to set one up and use. But getting approval to do things is often hard because the owners aren't tech-savvy, nor are they in the office often. Our Operations Manager runs the place, but she likes approval of the owners for a lot of things. None of them are open to change that easily especially if they don't know what it is. Sometimes it's hard to explain to them and convince them that it will make mine (and others) jobs easier on a daily basis.
if should happen onValidate of the customer# & also the ship-to code.
on the table not the form
http://www.BiloBeauty.com
http://www.autismspeaks.org
If you do not have access to the code you will need to get your NAV Partner to perform the modification for you.
Yeah, I don't have access to view C/AL Code of tables, so this modification won't be doable.
I don't see how base nav would not fill that field for you..did it EVER work for you? Has some mod been done?
Please verify that in the customer card drill into Shipping Agent Code From there click on the Shipping agents->shipping agent services - I assume Gound is there
http://www.BiloBeauty.com
http://www.autismspeaks.org
My license does not permit viewing C/AL Code on Tables. I can go into my Sales Order report designer, and then where it says Sales Header, I can click View C/AL Code. In there I have the following code in OnAfterGetRecord:
I don't think that's where you want me to be as per previous message in this thread I was told to go into Sales Header table, which my license does not permit me to view C/AL Code from there.
Far as I know it's never worked in the 3+ years I've been here. The other lady has been here since the day we've had Navision (2002 maybe?) and she says it's never worked.
They're all in there.. Ground, Ground Collect, Third Party, etc, etc.
you are correct - you do not want to be in the report code, that isn't related to your current issue.
there is a way to see the code in your table without a dev license, provided you have access to Code Coverage. Can you do the following:
click Tools > Debugger > Code Coverage. (not sure if it is in your version)
if so, you may be able to run code coverage, which gets you indirect look at the underlying code. i used this for years before we had a developer license in house.
then do the following:
open a sales order form, insert a new record (F3).
bring up code coverage. Press Start button.
return to sales order form. enter sell-to customer no. for customer you know has service defined.
navigate back to code coverage, press stop button. you should see a list of objects in the code coverage form. click on the sales header TABLE and press the Code button. this will open a form showing all the code in the sales header table. search (Control +F) the form for the field you are looking for (or search for the onvalidate triggers mentioned above).
you should be able to see where/if that field is being defined. hope this helps you!
Same stuff Savatage displayed.
.. that was copied from that page.
look for this under Sell-to Customer No. - OnValidate()
http://www.BiloBeauty.com
http://www.autismspeaks.org
When there's no Ship-to Address (just the default one on the customer card) it needs to fill in.. but it also needs to validate when I do select Ship-to Address. A few customers have different ship methods based on location.. if I ship to one store in Hawaii or Puerto Rico they use FedEx Third Party. If it's in United States they use FedEx Ground Collect.
since your license does not allow you to modify code behind tables, you now need to turn to your VAR and request this modification. you say that you see the code in the onvalidate of the sell-to customer, but is that code being called? Code that is called is often displayed in black text, while code that was not called in displayed in red on the code coverage code form. i suggest you search all of the sales header table code for the field you think needs to be auto defined and take note of all the places it is impacted. it may be true that 1 piece of code is correctly populating your field, but another piece of code is errantly wiping it out. by doing this research, you will come to better understand NAV and with that understanding, be able to more defined requests from your VAR, resulting in lower development costs.
i found that by going through code coverage and reading what was happening, i was able to provide detailed instructions to my reseller when i needed things tweaked. i could see, for example, if something was missing in the Ship-to Code OnValidate and specifically tell him to add something there. it reduced the billable hours as time passed (well, this is a very basic example, but you get the point).
Edited:
They found the code where it gets ship-to information and for some reason it fills in the two, but skips the third one. They're going to get back to me on it.
Regards
Albert
_______
Pret immobilier
One of the things I am using as leverage in getting this done is to say that I've already gotten a lot of modifications done on my own. That saved us more than the cost of this shipping modification. Also, the one report I was helped to create saves us at least 3 to 4 hours work every week! So, hopefully that will push them to get the modification done.