I have created a custom field in the Ship-to Address table (222) that I would like to transfer to the sales order header (36.) This field is for the customer’s collect freight account number and is only found in the Ship-to table.
I used the same field no., exact same name, type and length in the order header and ship-to tables. I inserted the field into both forms.
When running the sales order form though, the custom field in the header is not populated.
According to the advice I got from my solution provider, this should be all I have to do. What could I be doing wrong?
Dhan is correct. You have to tell the field what value should be assigned to it. Think about the way you did it for a second. Say you added a new text field to table 222 and table 36 and they both had the same length as Bill-to Address. How would NAV know what field gets assigned where?
Remember, it’s programming. It does EXACTLY what you tell it to do. And you never told anything to be copied to your new field. Follow Dhan’s advice, it’s perfect.
the license is much much much more than paying to have it done. I feel your pain.
You could also create a lookup flowfield that shows this code on the sales header without touching the code.
Create your new sales header field 50000+ range same type & size as the field you created in the ship-to address table.
view the properties of the new sales header field.
Fieldcalss = Flowfield
Calcformula = Lookup(“Ship-to Address”.“YOUR FIELD” WHERE(Customer No.=FIELD(Sell-to Customer No.),CODE=FIELD(Ship-to Code)))
**use the assistedit to get it 100% correct
Drop your new field in on the sales header card.
Save->Compile->Enjoy - But adding that one line of code is really the best way - but you can use that workaround if needed.
If this code is based on Ship-to Address table & each ship-to can have a different “you field” then adding the one line to OnValidate of the “Ship-to Code” is where i would have it put. Not on “No.” as stated above. If the customer has only 1 “freight collect code” then why would it be in the ship-to address table? that table is for other possible shipping options.
**I have read you are trying to impliment on your own. A good tip would be to write down all the little changes you would like to make and submit them all at the same time to a solution center so they can knock it all out at once instead of a little here & a little there. THey usually get payed by the hour not the minute so give them a full hour’s worth of work. good luck!
Thank you! That worked perfectly and was exactly the sort of creative no-budget solution that I was looking for. To pass a simple field around a few forms and documents shouldn’t cost me 100 chickens. And if I decide that I need a custom field to do more than sit there and look pretty, I’ll go to my solution center for help.
And as far as the Ship-to table is concerned, we use this submenu for areas or departments within a single Sell-to Customer that have unique shipping details, e.g. freight collect accounts and other special instructions that may need to print on the Sales Order and other documents used by the warehouse.
Our Customers are usually large manufacturers with several internal departments, ie. R&D, Quality Control or just general Stores. And of course, the Bill-to is usually a large centralized billing location elsewhere. So, a “Customer” location could have more than one collect account through the Ship-To table.