Ok...thank you for the help so far, but still stuck.
A couple things.
1. There is no pre-defined Bill To/Sold To link in Customer Maintenance; they are all on-the-fly in Sales Order Entry. Its like whoever won the bid, is the Bill To, so they are not picking it until the Address Tab in SO Entry.
2. I can't put the Ship To locations on the Bill To
3. Avatax is being used
4. I have the Bill To Exemption # coming into a UDF on the SO Header already. So, I have this working using the null Ship-To code, etc.
I thought I could just look at that UDF on the SO & use that data to populate the Exemption field in the SO Sales Tax tables.
What I found is when I go to the Totals tab with this Pre-Write script, the debugging shows blank data from that UDF. But, if I accept the Order & then go back in, add an item, & then move to Totals tab, my UDF data shows up. I am assuming this is because there is no data written yet for the SO Header when I am in there the first time around. The only field I can link on to the SO Sales Tax Summary is Sales Order No. So, even if I wanted to look at the Bill To Customer No on the Sales Order, this is still not written yet.
Its like I need to push data from SO Header into SO Sales Tax Summary instead of already being on the Tax table & pulling data in. Is this even possible?