Recently we had a request to add lines to the Dynamics Item Sites table (IV00102) for each LOCNCODE when a new item is added to Dynamics.
We wrote two scripts, one to update all the existing items, and a trigger to catch all the item adds going forward. The article below explains all.